From: Jan Kara <jack@suse.cz>
To: Andi Kleen <andi@firstfloor.org>
Cc: Jan Kara <jack@suse.cz>, Daniel J Blueman <daniel@numascale.com>,
"Theodore Ts'o" <tytso@mit.edu>,
linux-ext4@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Steffen Persvold <sp@numascale.com>,
Andreas Dilger <adilger.kernel@dilger.ca>
Subject: Re: ext4 performance falloff
Date: Mon, 7 Apr 2014 22:08:30 +0200 [thread overview]
Message-ID: <20140407200830.GC23670@quack.suse.cz> (raw)
In-Reply-To: <87bnwdjdoj.fsf@tassilo.jf.intel.com>
On Mon 07-04-14 09:40:28, Andi Kleen wrote:
> Jan Kara <jack@suse.cz> writes:
> >
> > What we really need is a counter where we can better estimate counts
> > accumulated in the percpu part of it. As the counter approaches zero, it's
> > CPU overhead will have to become that of a single locked variable but when
> > the value of counter is relatively high, we want it to be fast as the
> > percpu one. Possibly, each CPU could "reserve" part of the value in the
> > counter (by just decrementing the total value; how large that part should
> > be really needs to depend to the total value of the counter and number of
> > CPUs - in this regard we really differ from classical percpu couters) and
> > allocate/free using that part. If CPU cannot reserve what it is asked for
> > anymore, it would go and steal from parts other CPUs have accumulated,
> > returning them to global pool until it can satisfy the allocation.
>
> That's a percpu_counter() isn't it? (or cookie jar)
Not quite. We could use __percpu_counter_add() to set batch size for each
operation depending on the current counter value. But still we don't want
any cpu-local count to go negative (as then we cannot rely on global
counter to give us a lower bound on number of free blocks). Also stealing
from different cpu needs to be implemented...
> The MM uses similar techniques.
Where exactly? I'd be happy to be inspired :).
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2014-04-07 20:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 17:00 ext4 performance falloff Daniel J Blueman
2014-04-04 20:56 ` Theodore Ts'o
2014-04-05 3:28 ` Daniel J Blueman
2014-04-07 14:19 ` Jan Kara
2014-04-07 16:40 ` Andi Kleen
2014-04-07 20:08 ` Jan Kara [this message]
2014-04-08 10:30 ` Dave Chinner
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=20140407200830.GC23670@quack.suse.cz \
--to=jack@suse.cz \
--cc=adilger.kernel@dilger.ca \
--cc=andi@firstfloor.org \
--cc=daniel@numascale.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sp@numascale.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).