From: Linus Torvalds <torvalds@linux-foundation.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
patches@lists.linux.dev,
Roman Gushchin <roman.gushchin@linux.dev>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Chengming Zhou <chengming.zhou@linux.dev>
Subject: Re: [GIT PULL] slab updates for 6.10
Date: Mon, 13 May 2024 10:33:46 -0700 [thread overview]
Message-ID: <CAHk-=wiZpyWvC-nh4CPhKkPLMwWb_W00NDMopuxVNTnGB7fYeg@mail.gmail.com> (raw)
In-Reply-To: <587f5e6b-d543-4028-85c8-93cc8f581d02@suse.cz>
On Thu, 9 May 2024 at 07:25, Vlastimil Babka <vbabka@suse.cz> wrote:
>
> To avoid affecting fast paths with another shared counter (attempted in the
> past) or complex partial list traversal schemes that allow rescheduling, the
> chosen solution resorts to approximation - when the partial list is over
> 10000 slabs long, we will only traverse first 5000 slabs from head and tail
> each and use the average of those to estimate the whole list. Both head and
> tail are used as the slabs near head to tend to have more free objects than
> the slabs towards the tail.
I suspect you could have cut this down by an order of magnitude, and
made the limit be just 1k slabs rather than 10k slabs. Or even
_another_ order of magnitude smaller.
Somebody was being a bit too worried about approximations, methinks -
but I think the real worry goes the other way, where it's practically
so hard to even hit the approximation situation that it gets no
testing at all.
IOW, I suspect it's better to be explicit about approximations, and
have people aware of it, rather than be overly cautious and have it be
a special case that almost never triggers in any normal loads.
But pulled.
Linus
next prev parent reply other threads:[~2024-05-13 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 14:25 Vlastimil Babka
2024-05-13 17:33 ` Linus Torvalds [this message]
2024-05-20 10:18 ` Vlastimil Babka
2024-05-13 17:38 ` pr-tracker-bot
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='CAHk-=wiZpyWvC-nh4CPhKkPLMwWb_W00NDMopuxVNTnGB7fYeg@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=patches@lists.linux.dev \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=vbabka@suse.cz \
/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