* [PATCH] slub: remove loop redundancy in mm/slub.c
@ 2014-07-12 1:09 Hyoungho Choi
2014-07-14 7:06 ` Joonsoo Kim
0 siblings, 1 reply; 2+ messages in thread
From: Hyoungho Choi @ 2014-07-12 1:09 UTC (permalink / raw)
To: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
Andrew Morton
Cc: linux-mm, Hyoungho Choi
set_freepointer() is invoked twice for first object at new_slab().
Remove it.
Signed-off-by: Hyoungho Choi <holuyaa@gmail.com>
---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slub.c b/mm/slub.c
index 7300480..f6d0327 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1433,7 +1433,7 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
memset(start, POISON_INUSE, PAGE_SIZE << order);
last = start;
- for_each_object(p, s, start, page->objects) {
+ for_each_object(p, s, start + s->size, page->objects - 1) {
setup_object(s, page, last);
set_freepointer(s, last, p);
last = p;
--
2.0.1
--
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>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] slub: remove loop redundancy in mm/slub.c
2014-07-12 1:09 [PATCH] slub: remove loop redundancy in mm/slub.c Hyoungho Choi
@ 2014-07-14 7:06 ` Joonsoo Kim
0 siblings, 0 replies; 2+ messages in thread
From: Joonsoo Kim @ 2014-07-14 7:06 UTC (permalink / raw)
To: Hyoungho Choi
Cc: Christoph Lameter, Pekka Enberg, David Rientjes, Andrew Morton,
linux-mm
On Sat, Jul 12, 2014 at 10:09:10AM +0900, Hyoungho Choi wrote:
> set_freepointer() is invoked twice for first object at new_slab().
> Remove it.
Hello,
Same patch was already posted by Wei Yang. See the below.
https://lkml.org/lkml/2014/6/24/92
And, it is merged in a little bit different form for maintenance reason.
https://lkml.org/lkml/2014/7/3/404
Thanks.
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-14 7:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-12 1:09 [PATCH] slub: remove loop redundancy in mm/slub.c Hyoungho Choi
2014-07-14 7:06 ` Joonsoo Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).