From: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Mike Kravetz <mike.kravetz@oracle.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>
Subject: Re: [PATCH v3] mm/slab: Improve performance of gathering slabinfo stats
Date: Wed, 17 Aug 2016 12:25:33 -0700 [thread overview]
Message-ID: <a747d233-5e27-20c3-7e06-cee8d9f2bda1@oracle.com> (raw)
In-Reply-To: <1471460636.29842.20.camel@edumazet-glaptop3.roam.corp.google.com>
On 08/17/2016 12:03 PM, Eric Dumazet wrote:
> On Wed, 2016-08-17 at 11:20 -0700, Aruna Ramakrishna wrote:
> ]
>> - list_for_each_entry(page, &n->slabs_full, lru) {
>> - if (page->active != cachep->num && !error)
>> - error = "slabs_full accounting error";
>> - active_objs += cachep->num;
>> - active_slabs++;
>> - }
>
> Since you only removed this loop, you could track only number of
> full_slabs.
>
> This would avoid messing with n->num_slabs all over the places in fast
> path.
>
> Please also update slab_out_of_memory()
>
Eric,
Right now, n->num_slabs is modified only when a slab is detached from
slabs_free (i.e. in drain_freelist and free_block) or when a new one is
attached in cache_grow_end. None of those 3 calls are in the fast path,
right? Tracking just full_slabs would also involve similar changes:
decrement when a slab moves from full to partial during free_block, and
increment when it moves from partial/free to full after allocation in
fixup_slab_list. So I don't see what the real difference/advantage is.
I will update slab_out_of_memory and remove the slabs_full list
traversal there too.
Thanks,
Aruna
next prev parent reply other threads:[~2016-08-17 19:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 18:20 Aruna Ramakrishna
2016-08-17 19:03 ` Eric Dumazet
2016-08-17 19:25 ` Aruna Ramakrishna [this message]
2016-08-18 11:52 ` Michal Hocko
2016-08-19 5:47 ` aruna.ramakrishna
2016-08-23 2:13 ` Joonsoo Kim
2016-08-23 15:38 ` what is the purpose of SLAB and SLUB (was: Re: [PATCH v3] mm/slab: Improve performance of gathering slabinfo) stats Michal Hocko
2016-08-23 15:54 ` what is the purpose of SLAB and SLUB Andi Kleen
2016-08-25 4:10 ` Christoph Lameter
2016-08-25 7:32 ` Michal Hocko
2016-08-25 19:49 ` Christoph Lameter
2016-08-24 1:15 ` what is the purpose of SLAB and SLUB (was: Re: [PATCH v3] mm/slab: Improve performance of gathering slabinfo) stats Joonsoo Kim
2016-08-24 8:05 ` Michal Hocko
2016-08-24 8:20 ` Mel Gorman
2016-08-25 4:01 ` Christoph Lameter
2016-08-25 10:07 ` Mel Gorman
2016-08-25 19:55 ` Christoph Lameter
2016-08-26 20:47 ` what is the purpose of SLAB and SLUB Andi Kleen
2016-08-29 13:44 ` Michal Hocko
2016-08-29 14:49 ` Christoph Lameter
2016-08-30 9:39 ` what is the purpose of SLAB and SLUB (was: Re: [PATCH v3] mm/slab: Improve performance of gathering slabinfo) stats Mel Gorman
2016-08-30 19:32 ` Christoph 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=a747d233-5e27-20c3-7e06-cee8d9f2bda1@oracle.com \
--to=aruna.ramakrishna@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=eric.dumazet@gmail.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--subject='Re: [PATCH v3] mm/slab: Improve performance of gathering slabinfo stats' \
/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
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).