Re: [PATCH] mm/vmscan: make global_reclaim() inline
On Thu, Aug 22, 2013 at 01:39:56PM +0800, larmbr wrote: > Though Gcc is likely to inline them, we should better > explictly do it manually, and also, this serve to document > this fact. Why? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mm/vmscan: make global_reclaim() inline
On Thu, Aug 22, 2013 at 01:39:56PM +0800, larmbr wrote: Though Gcc is likely to inline them, we should better explictly do it manually, and also, this serve to document this fact. Why? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] mm/vmscan: make global_reclaim() inline
Though Gcc is likely to inline them, we should better explictly do it manually, and also, this serve to document this fact. Signed-off-by: Zhan Jianyu --- mm/vmscan.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 1de652d..1946d7d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -135,12 +135,12 @@ static LIST_HEAD(shrinker_list); static DECLARE_RWSEM(shrinker_rwsem); #ifdef CONFIG_MEMCG -static bool global_reclaim(struct scan_control *sc) +static inline bool global_reclaim(struct scan_control *sc) { return !sc->target_mem_cgroup; } #else -static bool global_reclaim(struct scan_control *sc) +static inline bool global_reclaim(struct scan_control *sc) { return true; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] mm/vmscan: make global_reclaim() inline
Though Gcc is likely to inline them, we should better explictly do it manually, and also, this serve to document this fact. Signed-off-by: Zhan Jianyu nasa4...@gmail.com --- mm/vmscan.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 1de652d..1946d7d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -135,12 +135,12 @@ static LIST_HEAD(shrinker_list); static DECLARE_RWSEM(shrinker_rwsem); #ifdef CONFIG_MEMCG -static bool global_reclaim(struct scan_control *sc) +static inline bool global_reclaim(struct scan_control *sc) { return !sc-target_mem_cgroup; } #else -static bool global_reclaim(struct scan_control *sc) +static inline bool global_reclaim(struct scan_control *sc) { return true; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/