From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Zhang Yanfei <zhangyanfei.yes@gmail.com>,
Linux MM <linux-mm@kvack.org>,
mgorman@suse.de, minchan@kernel.org,
kamezawa.hiroyu@jp.fujitsu.com, m.szyprowski@samsung.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] mm: rename confusing function names
Date: Wed, 06 Feb 2013 09:34:16 +0800 [thread overview]
Message-ID: <5111B318.9020204@cn.fujitsu.com> (raw)
In-Reply-To: <20130205172057.3be4dbd4.akpm@linux-foundation.org>
于 2013年02月06日 09:20, Andrew Morton 写道:
> On Wed, 06 Feb 2013 09:06:05 +0800
> Zhang Yanfei <zhangyanfei@cn.fujitsu.com> wrote:
>
>> So could I rename the functions to the names like
>> nr_available_buffer_high_pages
>> And accurately document them with code comments just as you suggested.
>
> gee. "available" implies "available for you to allocate". It has the
> same problem as "free".
>
> And "buffer" shouldn't be there - that's a reflection of the fact
> that buffer_head payloads are not allocated from highmem. An archaic
> irrelevant thing.
>
> Seriously, first let's write down the descriptions of what these
> functions *do*. Then choose nice names which abbreviate that.
>
OK, I will try to do this.
>
>
> hm,
>
> static unsigned int nr_free_zone_pages(int offset)
> {
> ...
> unsigned int sum = 0;
> ...
> return sum;
> }
>
> How long will it be until these things start exploding from
> sums-of-zones which exceed 16TB?
>
You mean overflow? Hmm.. it might happens. Change the sum to
unsigned long is ok?
Thanks
Zhang Yanfei
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Zhang Yanfei <zhangyanfei.yes@gmail.com>,
Linux MM <linux-mm@kvack.org>,
mgorman@suse.de, minchan@kernel.org,
kamezawa.hiroyu@jp.fujitsu.com, m.szyprowski@samsung.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] mm: rename confusing function names
Date: Wed, 06 Feb 2013 09:34:16 +0800 [thread overview]
Message-ID: <5111B318.9020204@cn.fujitsu.com> (raw)
In-Reply-To: <20130205172057.3be4dbd4.akpm@linux-foundation.org>
于 2013年02月06日 09:20, Andrew Morton 写道:
> On Wed, 06 Feb 2013 09:06:05 +0800
> Zhang Yanfei <zhangyanfei@cn.fujitsu.com> wrote:
>
>> So could I rename the functions to the names like
>> nr_available_buffer_high_pages
>> And accurately document them with code comments just as you suggested.
>
> gee. "available" implies "available for you to allocate". It has the
> same problem as "free".
>
> And "buffer" shouldn't be there - that's a reflection of the fact
> that buffer_head payloads are not allocated from highmem. An archaic
> irrelevant thing.
>
> Seriously, first let's write down the descriptions of what these
> functions *do*. Then choose nice names which abbreviate that.
>
OK, I will try to do this.
>
>
> hm,
>
> static unsigned int nr_free_zone_pages(int offset)
> {
> ...
> unsigned int sum = 0;
> ...
> return sum;
> }
>
> How long will it be until these things start exploding from
> sums-of-zones which exceed 16TB?
>
You mean overflow? Hmm.. it might happens. Change the sum to
unsigned long is ok?
Thanks
Zhang Yanfei
next prev parent reply other threads:[~2013-02-06 1:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 17:09 [PATCH 0/3] mm: rename confusing function names Zhang Yanfei
2013-02-05 17:09 ` Zhang Yanfei
2013-02-05 17:11 ` [PATCH 1/3] mm: rename nr_free_zone_pages to nr_free_zone_high_pages Zhang Yanfei
2013-02-05 17:11 ` Zhang Yanfei
2013-02-05 17:13 ` [PATCH 2/3] mm: rename nr_free_buffer_pages to nr_free_buffer_high_pages Zhang Yanfei
2013-02-05 17:13 ` Zhang Yanfei
2013-02-05 17:14 ` [PATCH 3/3] mm: rename nr_free_pagecache_pages to nr_free_pagecache_high_pages Zhang Yanfei
2013-02-05 17:14 ` Zhang Yanfei
2013-02-05 19:26 ` [PATCH 0/3] mm: rename confusing function names Johannes Weiner
2013-02-05 19:26 ` Johannes Weiner
2013-02-05 22:13 ` Andrew Morton
2013-02-05 22:13 ` Andrew Morton
2013-02-06 1:06 ` Zhang Yanfei
2013-02-06 1:06 ` Zhang Yanfei
2013-02-06 1:20 ` Andrew Morton
2013-02-06 1:20 ` Andrew Morton
2013-02-06 1:34 ` Zhang Yanfei [this message]
2013-02-06 1:34 ` Zhang Yanfei
2013-02-06 1:58 ` Andrew Morton
2013-02-06 1:58 ` Andrew Morton
2013-02-08 13:34 ` Robin Holt
2013-02-08 13:34 ` Robin Holt
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=5111B318.9020204@cn.fujitsu.com \
--to=zhangyanfei@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=zhangyanfei.yes@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.