From: Michal Hocko <mhocko@kernel.org>
To: Jiang Biao <jiang.biao2@zte.com.cn>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
hillf.zj@alibaba-inc.com, minchan@kernel.org,
ying.huang@intel.com, mgorman@techsingularity.net,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
zhong.weidong@zte.com.cn
Subject: Re: [PATCH] mm/vmscan: change return type of is_page_cache_freeable from int to bool
Date: Tue, 28 Nov 2017 09:04:34 +0100 [thread overview]
Message-ID: <20171128080434.z32gfedrzq37rsqe@dhcp22.suse.cz> (raw)
In-Reply-To: <1511837307-56494-1-git-send-email-jiang.biao2@zte.com.cn>
On Tue 28-11-17 10:48:27, Jiang Biao wrote:
> Using bool for the return type of is_page_cache_freeable() should be
> more appropriate.
Does this help to generate a better code or why do we want to change
this at all?
> Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
> ---
> mm/vmscan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index eb2f031..5fe63ed 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -530,7 +530,7 @@ void drop_slab(void)
> drop_slab_node(nid);
> }
>
> -static inline int is_page_cache_freeable(struct page *page)
> +static inline bool is_page_cache_freeable(struct page *page)
> {
> /*
> * A freeable page cache page is referenced only by the caller
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-11-28 8:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 2:48 Jiang Biao
2017-11-28 8:04 ` Michal Hocko [this message]
2017-11-28 9:21 ` [PATCH] mm/vmscan: change return type of is_page_cache_freeablefrom " jiang.biao2
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171128080434.z32gfedrzq37rsqe@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=hillf.zj@alibaba-inc.com \
--cc=jiang.biao2@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=minchan@kernel.org \
--cc=ying.huang@intel.com \
--cc=zhong.weidong@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox