linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Roman Gushchin <roman.gushchin@linux.dev>,
	Vasily Averin <vvs@virtuozzo.com>,
	Christoph Lameter <cl@linux.com>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Pekka Enberg <penberg@kernel.org>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	kernel@openvz.org
Subject: Re: slabinfo shows incorrect active_objs ???
Date: Wed, 23 Feb 2022 00:08:23 +0100	[thread overview]
Message-ID: <5f318050-cf2a-2e3b-b980-f449d5c54f7c@suse.cz> (raw)
In-Reply-To: <2CB29870-0D00-4518-A720-5B0A4B82CAF7@linux.dev>

On 2/22/22 21:59, Roman Gushchin wrote:
> 
>> On Feb 22, 2022, at 4:10 AM, Vasily Averin <vvs@virtuozzo.com> wrote:

BTW please To/Cc directly all slab maintainers on future slab related
threads (added now).

>> On 22.02.2022 13:23, Hyeonggon Yoo wrote:
>>>> On Tue, Feb 22, 2022 at 12:22:02PM +0300, Vasily Averin wrote:
>>>> Dear all,
>>>> 
>>>> I've found that /proc/slabinfo shows inadequate numbers of in-use slab objects.
>>>> it assumes that all objects stored in cpu caches are always 100% in use.
>> 
>>>> Is it a bug or perhaps a well-known feature that I missed?
>>> This is not a bug..
>> 
>> Thank you for explanation,
>> I think it would be useful to document this somewhere. (Documnetation? man slabinfo ?)
>> Also I would like to know is it some (fast) way to get real numbers in userspace ?
>> crash is too fat for this task.
>> Do you know perhaps some other userspace utility or may be systemtap/drgn script?
> 
> Btw, implementing fast slab counters independent from the sl*b implementation and the physical layout of data might be an interesting idea.

Interesting idea, but merging will be an issue if we ever manage to
officially allow kfree() on object allocated by kmem_cache_alloc() - which
is now blocked by SLOB (there was a recent thread that stalled).

> Currently /proc/slabinfo is often confusing because of the slab merging. It’s particularly true when someone tries to compare memory usage on two different kernel versions, for example: the set of slab caches might look very different depending on subtle changes in object sizes and the caches merging outcome.
> 



  reply	other threads:[~2022-02-22 23:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  9:22 Vasily Averin
2022-02-22 10:23 ` Hyeonggon Yoo
2022-02-22 12:10   ` Vasily Averin
2022-02-22 16:32     ` Shakeel Butt
2022-02-22 16:47     ` Roman Gushchin
2022-02-23  1:07       ` Vasily Averin
2022-02-22 20:59     ` Roman Gushchin
2022-02-22 23:08       ` Vlastimil Babka [this message]
2022-02-23  0:07         ` Roman Gushchin
2022-02-23  0:32           ` Vlastimil Babka
2022-02-23  3:45             ` Hyeonggon Yoo
2022-02-23 17:31               ` Vlastimil Babka
2022-02-23 18:15                 ` Roman Gushchin
2022-02-24 13:16                 ` Vasily Averin
2022-02-25  0:08                   ` Roman Gushchin
2022-02-25  4:37                     ` Vasily Averin
2022-02-28  6:17                       ` Vasily Averin
2022-02-28 10:22                         ` Hyeonggon Yoo
2022-02-28 10:28                           ` Hyeonggon Yoo
2022-02-28 10:43                         ` Hyeonggon Yoo
2022-02-28 12:09                         ` Hyeonggon Yoo
2022-03-03  8:39                   ` Christoph Lameter
2022-03-04 16:29     ` Vlastimil Babka
2022-02-22 11:10 ` Vlastimil Babka

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=5f318050-cf2a-2e3b-b980-f449d5c54f7c@suse.cz \
    --to=vbabka@suse.cz \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kernel@openvz.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vvs@virtuozzo.com \
    /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