Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1378392
| Path | csiph.com!news.freedyn.net!newsfeed.datemas.de!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Joonsoo Kim <iamjoonsoo.kim@lge.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 01/11] mm/slab: fix the theoretical race by holding proper lock |
| Date | Thu, 14 Apr 2016 04:00:03 +0200 |
| Message-ID | <rnEJB-2fa-7@gated-at.bofh.it> (permalink) |
| References | <rmYAF-1fb-3@gated-at.bofh.it> <rmYAG-1fb-17@gated-at.bofh.it> <rn9w5-1Xf-3@gated-at.bofh.it> |
| X-Original-Senderip | 156.147.1.121 |
| X-Original-Mailfrom | iamjoonsoo.kim@lge.com |
| X-Original-Senderip | 10.177.222.138 |
| X-Original-Mailfrom | iamjoonsoo.kim@lge.com |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 31 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Andrew Morton <akpm@linux-foundation.org>, Pekka Enberg <penberg@kernel.org>, David Rientjes <rientjes@google.com>, Jesper Dangaard Brouer <brouer@redhat.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Thu, 14 Apr 2016 10:56:40 +0900 |
| X-Original-Message-ID | <20160414015640.GB9198@js1304-P5Q-DELUXE> |
| X-Original-References | <1460436666-20462-1-git-send-email-iamjoonsoo.kim@lge.com> <1460436666-20462-2-git-send-email-iamjoonsoo.kim@lge.com> <alpine.DEB.2.20.1604121137470.14315@east.gentwo.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1378392 |
Show key headers only | View raw
On Tue, Apr 12, 2016 at 11:38:39AM -0500, Christoph Lameter wrote:
> On Tue, 12 Apr 2016, js1304@gmail.com wrote:
>
> > @@ -2222,6 +2241,7 @@ static void drain_cpu_caches(struct kmem_cache *cachep)
> > {
> > struct kmem_cache_node *n;
> > int node;
> > + LIST_HEAD(list);
> >
> > on_each_cpu(do_drain, cachep, 1);
> > check_irq_on();
> > @@ -2229,8 +2249,13 @@ static void drain_cpu_caches(struct kmem_cache *cachep)
> > if (n->alien)
> > drain_alien_cache(cachep, n->alien);
> >
> > - for_each_kmem_cache_node(cachep, node, n)
> > - drain_array(cachep, n, n->shared, 1, node);
> > + for_each_kmem_cache_node(cachep, node, n) {
> > + spin_lock_irq(&n->list_lock);
> > + drain_array_locked(cachep, n->shared, node, true, &list);
> > + spin_unlock_irq(&n->list_lock);
> > +
> > + slabs_destroy(cachep, &list);
>
> Can the slabs_destroy() call be moved outside of the loop? It may be
> faster then?
Yes, it can. But, I'd prefer to call it on each node. It would be
better for cache although it would be marginal.
Thanks.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 01/11] mm/slab: fix the theoretical race by holding proper lock js1304@gmail.com - 2016-04-12 07:00 +0200
Re: [PATCH v2 01/11] mm/slab: fix the theoretical race by holding proper lock Christoph Lameter <cl@linux.com> - 2016-04-12 18:40 +0200
Re: [PATCH v2 01/11] mm/slab: fix the theoretical race by holding proper lock Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-04-14 04:00 +0200
csiph-web