From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: penberg@kernel.org, cl@linux-foundation.org, mpm@selenic.com
Cc: Linux MM <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Subject: Re: [PATCH] mm, slab: Drop unnecessary slabp->inuse < cachep->num test
Date: Tue, 02 Jul 2013 00:36:11 +0800 [thread overview]
Message-ID: <51D1AFFB.4010307@gmail.com> (raw)
In-Reply-To: <51D1AE84.8010404@gmail.com>
Sorry for making noise. I've made a mistake and please ignore this patch.
On 07/02/2013 12:29 AM, Zhang Yanfei wrote:
> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>
> In function cache_alloc_refill, we have used BUG_ON to ensure
> that slabp->inuse is less than cachep->num before the while
> test. And in the while body, we do not change the value of
> slabp->inuse and cachep->num, so it is not necessary to test
> if slabp->inuse < cachep->num test for every loop.
>
> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> ---
> mm/slab.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 8ccd296..c2076c2 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3004,7 +3004,7 @@ retry:
> */
> BUG_ON(slabp->inuse >= cachep->num);
>
> - while (slabp->inuse < cachep->num && batchcount--) {
> + while (batchcount--) {
> STATS_INC_ALLOCED(cachep);
> STATS_INC_ACTIVE(cachep);
> STATS_SET_HIGH(cachep);
--
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.yes@gmail.com>
To: penberg@kernel.org, cl@linux-foundation.org, mpm@selenic.com
Cc: Linux MM <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Subject: Re: [PATCH] mm, slab: Drop unnecessary slabp->inuse < cachep->num test
Date: Tue, 02 Jul 2013 00:36:11 +0800 [thread overview]
Message-ID: <51D1AFFB.4010307@gmail.com> (raw)
In-Reply-To: <51D1AE84.8010404@gmail.com>
Sorry for making noise. I've made a mistake and please ignore this patch.
On 07/02/2013 12:29 AM, Zhang Yanfei wrote:
> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>
> In function cache_alloc_refill, we have used BUG_ON to ensure
> that slabp->inuse is less than cachep->num before the while
> test. And in the while body, we do not change the value of
> slabp->inuse and cachep->num, so it is not necessary to test
> if slabp->inuse < cachep->num test for every loop.
>
> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> ---
> mm/slab.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 8ccd296..c2076c2 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3004,7 +3004,7 @@ retry:
> */
> BUG_ON(slabp->inuse >= cachep->num);
>
> - while (slabp->inuse < cachep->num && batchcount--) {
> + while (batchcount--) {
> STATS_INC_ALLOCED(cachep);
> STATS_INC_ACTIVE(cachep);
> STATS_SET_HIGH(cachep);
--
Thanks.
Zhang Yanfei
next prev parent reply other threads:[~2013-07-01 16:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 16:29 [PATCH] mm, slab: Drop unnecessary slabp->inuse < cachep->num test Zhang Yanfei
2013-07-01 16:29 ` Zhang Yanfei
2013-07-01 16:36 ` Zhang Yanfei [this message]
2013-07-01 16:36 ` Zhang Yanfei
2013-07-01 18:19 ` Christoph Lameter
2013-07-01 18:19 ` Christoph Lameter
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=51D1AFFB.4010307@gmail.com \
--to=zhangyanfei.yes@gmail.com \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=penberg@kernel.org \
--cc=zhangyanfei@cn.fujitsu.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.