From: Roman Lakeev <sunnyddayss@gmail.com>
Cc: Roman Lakeev <sunnyddayss@gmail.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm/slab.c: remove duplicated check of colour_next
Date: Sun, 11 Mar 2018 15:25:34 +0300 [thread overview]
Message-ID: <87bmfulry9.fsf@gmail.com> (raw)
Date: Sun, 11 Mar 2018 11:05:29 +0300
Signed-off-by: Roman Lakeev <sunnyddayss@gmail.com>
remove check that offset greater than cachep->colour
bacause this is already checked in previous lines
---
mm/slab.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 324446621b3e..6a48f122bd82 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2674,11 +2674,7 @@ static struct page *cache_grow_begin(struct kmem_cache *cachep,
if (n->colour_next >= cachep->colour)
n->colour_next = 0;
- offset = n->colour_next;
- if (offset >= cachep->colour)
- offset = 0;
-
- offset *= cachep->colour_off;
+ offset = n->colour_next * cachep->colour_off;
/* Get slab management. */
freelist = alloc_slabmgmt(cachep, page, offset,
--
2.16.2
WARNING: multiple messages have this Message-ID (diff)
From: Roman Lakeev <sunnyddayss@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Roman Lakeev <sunnyddayss@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] mm/slab.c: remove duplicated check of colour_next
Date: Sun, 11 Mar 2018 15:25:34 +0300 [thread overview]
Message-ID: <87bmfulry9.fsf@gmail.com> (raw)
Date: Sun, 11 Mar 2018 11:05:29 +0300
Signed-off-by: Roman Lakeev <sunnyddayss@gmail.com>
remove check that offset greater than cachep->colour
bacause this is already checked in previous lines
---
mm/slab.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 324446621b3e..6a48f122bd82 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2674,11 +2674,7 @@ static struct page *cache_grow_begin(struct kmem_cache *cachep,
if (n->colour_next >= cachep->colour)
n->colour_next = 0;
- offset = n->colour_next;
- if (offset >= cachep->colour)
- offset = 0;
-
- offset *= cachep->colour_off;
+ offset = n->colour_next * cachep->colour_off;
/* Get slab management. */
freelist = alloc_slabmgmt(cachep, page, offset,
--
2.16.2
next reply other threads:[~2018-03-11 12:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 12:25 Roman Lakeev [this message]
2018-03-11 12:25 ` [PATCH] mm/slab.c: remove duplicated check of colour_next Roman Lakeev
2018-03-11 8:05 ` Roman Lakeev
2018-03-11 8:05 ` Roman Lakeev
2018-03-11 19:49 ` David Rientjes
2018-03-12 13:53 ` Christopher 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=87bmfulry9.fsf@gmail.com \
--to=sunnyddayss@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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.