From: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, dgc@sgi.com, Mel Gorman <mel@skynet.ie>
Subject: Re: [patch 00/12] Slab defragmentation V3
Date: Fri, 08 Jun 2007 21:47:38 +0200 [thread overview]
Message-ID: <4669B25A.6010404@googlemail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706081239340.2447@schroedinger.engr.sgi.com>
Christoph Lameter pisze:
> On Fri, 8 Jun 2007, Christoph Lameter wrote:
>
>> On Fri, 8 Jun 2007, Michal Piotrowski wrote:
>>
>>> Yes, it does. Thanks!
>> Ahhh... That leds to the discovery more sysfs problems. I need to make
>> sure not to be holding locks while calling into sysfs. More cleanup...
>
> Could you remove the trylock patch and see how this one fares? We may need
> both but this should avoid taking the slub_lock around any possible alloc
> of sysfs.
>
>
It's a bit tricky
cat ../sd2.patch | patch -p1
patching file mm/slub.c
Hunk #1 succeeded at 2194 (offset 15 lines).
Hunk #2 FAILED at 2653.
1 out of 2 hunks FAILED -- saving rejects to file mm/slub.c.rej
[michal@bitis-gabonica linux-work3]$ cat mm/slub.c.rej
***************
*** 2652,2677 ****
*/
s->objsize = max(s->objsize, (int)size);
s->inuse = max_t(int, s->inuse, ALIGN(size, sizeof(void *)));
if (sysfs_slab_alias(s, name))
goto err;
- } else {
- s = kmalloc(kmem_size, GFP_KERNEL);
- if (s && kmem_cache_open(s, GFP_KERNEL, name,
size, align, flags, ctor)) {
- if (sysfs_slab_add(s)) {
- kfree(s);
- goto err;
- }
list_add(&s->list, &slab_caches);
raise_kswapd_order(s->order);
- } else
- kfree(s);
}
up_write(&slub_lock);
- return s;
err:
- up_write(&slub_lock);
if (flags & SLAB_PANIC)
panic("Cannot create slabcache %s\n", name);
else
--- 2653,2685 ----
*/
s->objsize = max(s->objsize, (int)size);
s->inuse = max_t(int, s->inuse, ALIGN(size, sizeof(void *)));
+ up_write(&slub_lock);
+
if (sysfs_slab_alias(s, name))
goto err;
+
+ return s;
+ }
+
+ s = kmalloc(kmem_size, GFP_KERNEL);
+ if (s) {
+ if (kmem_cache_open(s, GFP_KERNEL, name,
size, align, flags, ctor)) {
list_add(&s->list, &slab_caches);
+ up_write(&slub_lock);
raise_kswapd_order(s->order);
+
+ if (sysfs_slab_add(s))
+ goto err;
+
+ return s;
+
+ }
+ kfree(s);
}
up_write(&slub_lock);
err:
if (flags & SLAB_PANIC)
panic("Cannot create slabcache %s\n", name);
else
Regards,
Michal
--
"Najbardziej brakowało mi twojego milczenia."
-- Andrzej Sapkowski "Coś więcej"
WARNING: multiple messages have this Message-ID (diff)
From: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, dgc@sgi.com, Mel Gorman <mel@skynet.ie>
Subject: Re: [patch 00/12] Slab defragmentation V3
Date: Fri, 08 Jun 2007 21:47:38 +0200 [thread overview]
Message-ID: <4669B25A.6010404@googlemail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706081239340.2447@schroedinger.engr.sgi.com>
Christoph Lameter pisze:
> On Fri, 8 Jun 2007, Christoph Lameter wrote:
>
>> On Fri, 8 Jun 2007, Michal Piotrowski wrote:
>>
>>> Yes, it does. Thanks!
>> Ahhh... That leds to the discovery more sysfs problems. I need to make
>> sure not to be holding locks while calling into sysfs. More cleanup...
>
> Could you remove the trylock patch and see how this one fares? We may need
> both but this should avoid taking the slub_lock around any possible alloc
> of sysfs.
>
>
It's a bit tricky
cat ../sd2.patch | patch -p1
patching file mm/slub.c
Hunk #1 succeeded at 2194 (offset 15 lines).
Hunk #2 FAILED at 2653.
1 out of 2 hunks FAILED -- saving rejects to file mm/slub.c.rej
[michal@bitis-gabonica linux-work3]$ cat mm/slub.c.rej
***************
*** 2652,2677 ****
*/
s->objsize = max(s->objsize, (int)size);
s->inuse = max_t(int, s->inuse, ALIGN(size, sizeof(void *)));
if (sysfs_slab_alias(s, name))
goto err;
- } else {
- s = kmalloc(kmem_size, GFP_KERNEL);
- if (s && kmem_cache_open(s, GFP_KERNEL, name,
size, align, flags, ctor)) {
- if (sysfs_slab_add(s)) {
- kfree(s);
- goto err;
- }
list_add(&s->list, &slab_caches);
raise_kswapd_order(s->order);
- } else
- kfree(s);
}
up_write(&slub_lock);
- return s;
err:
- up_write(&slub_lock);
if (flags & SLAB_PANIC)
panic("Cannot create slabcache %s\n", name);
else
--- 2653,2685 ----
*/
s->objsize = max(s->objsize, (int)size);
s->inuse = max_t(int, s->inuse, ALIGN(size, sizeof(void *)));
+ up_write(&slub_lock);
+
if (sysfs_slab_alias(s, name))
goto err;
+
+ return s;
+ }
+
+ s = kmalloc(kmem_size, GFP_KERNEL);
+ if (s) {
+ if (kmem_cache_open(s, GFP_KERNEL, name,
size, align, flags, ctor)) {
list_add(&s->list, &slab_caches);
+ up_write(&slub_lock);
raise_kswapd_order(s->order);
+
+ if (sysfs_slab_add(s))
+ goto err;
+
+ return s;
+
+ }
+ kfree(s);
}
up_write(&slub_lock);
err:
if (flags & SLAB_PANIC)
panic("Cannot create slabcache %s\n", name);
else
Regards,
Michal
--
"Najbardziej brakowaA?o mi twojego milczenia."
-- Andrzej Sapkowski "CoA? wiA?cej"
--
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:[~2007-06-08 19:47 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 21:55 [patch 00/12] Slab defragmentation V3 clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 01/12] SLUB: Add support for kmem_cache_ops clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 02/12] SLUB: Slab defragmentation core functionality clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 03/12] SLUB: Extend slabinfo to support -D and -C options clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 04/12] SLUB: Slab defragmentation trigger clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 05/12] Generic inode defragmentation clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 06/12] ext2 ext3 ext4: support inode slab defragmentation clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 07/12] xfs: inode defragmentation support clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 08/12] procfs: " clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 09/12] reiserfs: " clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 10/12] sockets: " clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 11/12] Dentry defragmentation clameter
2007-06-07 21:55 ` clameter
2007-06-07 21:55 ` [patch 12/12] SLUB: Support memory defrag through kmem_cache_vacate() clameter
2007-06-07 21:55 ` clameter
2007-06-08 9:39 ` [patch 00/12] Slab defragmentation V3 Michal Piotrowski
2007-06-08 15:16 ` Christoph Lameter
2007-06-08 15:16 ` Christoph Lameter
2007-06-08 15:28 ` Christoph Lameter
2007-06-08 15:28 ` Christoph Lameter
2007-06-08 15:45 ` Michal Piotrowski
2007-06-08 18:02 ` Michal Piotrowski
2007-06-08 18:02 ` Michal Piotrowski
2007-06-08 18:16 ` Christoph Lameter
2007-06-08 18:16 ` Christoph Lameter
2007-06-08 18:56 ` Michal Piotrowski
2007-06-08 19:08 ` Christoph Lameter
2007-06-08 19:08 ` Christoph Lameter
2007-06-08 19:32 ` Michal Piotrowski
2007-06-08 19:32 ` Michal Piotrowski
2007-06-08 19:38 ` Christoph Lameter
2007-06-08 19:38 ` Christoph Lameter
2007-06-08 19:40 ` Christoph Lameter
2007-06-08 19:40 ` Christoph Lameter
2007-06-08 19:47 ` Michal Piotrowski [this message]
2007-06-08 19:47 ` Michal Piotrowski
2007-06-08 20:48 ` Christoph Lameter
2007-06-08 20:48 ` Christoph Lameter
2007-06-08 21:17 ` Michal Piotrowski
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=4669B25A.6010404@googlemail.com \
--to=michal.k.k.piotrowski@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
/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.