From: Christoph Lameter <cl@linux.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] slub: Avoid irqoff/on in bulk allocation
Date: Wed, 2 Sep 2015 13:04:08 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.11.1509021300460.14827@east.gentwo.org> (raw)
In-Reply-To: <20150902110950.4d407c0f@redhat.com>
On Wed, 2 Sep 2015, Jesper Dangaard Brouer wrote:
> > +error:
> > + __kmem_cache_free_bulk(s, i, p);
>
> Don't we need to update "tid" here, like:
>
> c->tid = next_tid(c->tid);
>
> Consider a call to the ordinary kmem_cache_alloc/slab_alloc_node was
> in-progress, which get PREEMPT'ed just before it's call to
> this_cpu_cmpxchg_double().
> Now, this function gets called and we modify c->freelist, but cannot
> get all objects and then fail (goto error). Although we put-back
> objects (via __kmem_cache_free_bulk) don't we want to update c->tid
> in-order to make sure the call to this_cpu_cmpxchg_double() retry?
Hmm... I thought that __kmem_cache_free_bulk is run with interrupts
disabled and will invoke the __slab_free which will increment tid if any
objects are freed from the local page.
That occurs before interrupts are reenabled.
--
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:[~2015-09-02 18:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 19:44 Christoph Lameter
2015-09-02 9:09 ` Jesper Dangaard Brouer
2015-09-02 18:04 ` Christoph Lameter [this message]
2015-09-02 18:51 ` Jesper Dangaard Brouer
2015-09-16 22:13 ` Andrew Morton
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=alpine.DEB.2.11.1509021300460.14827@east.gentwo.org \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=brouer@redhat.com \
--cc=linux-mm@kvack.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox