From: Minchan Kim Date: Thu, 13 Jan 2011 23:46:27 +0000 (-0800) Subject: writeback: avoid unnecessary determine_dirtyable_memory call X-Git-Tag: v2.6.38-rc1~172 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=240c879f20a605346705be24253bc9fc6fa8a106;p=pandora-kernel.git writeback: avoid unnecessary determine_dirtyable_memory call I think determine_dirtyable_memory() is a rather costly function since it need many atomic reads for gathering zone/global page state. But when we use vm_dirty_bytes && dirty_background_bytes, we don't need that costly calculation. This patch eliminates such unnecessary overhead. NOTE : newly added if condition might add overhead in normal path. But it should be _really_ small because anyway we need the access both vm_dirty_bytes and dirty_background_bytes so it is likely to hit the cache. [akpm@linux-foundation.org: fix used-uninitialised warning] Signed-off-by: Minchan Kim Cc: Wu Fengguang Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed