From: "Jeff V. Merkey" <jmerkey@vger.timpanogas.org>
To: Alexander Viro <viro@math.psu.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Negative scalability by removal of lock_kernel()?(Was: Strange performance behavior of 2.4.0-test9)
Date: Fri, 27 Oct 2000 02:17:50 -0600 [thread overview]
Message-ID: <20001027021750.A2944@vger.timpanogas.org> (raw)
In-Reply-To: <39F92187.A7621A09@timpanogas.org> <Pine.GSO.4.21.0010270257550.18660-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0010270257550.18660-100000@weyl.math.psu.edu>; from viro@math.psu.edu on Fri, Oct 27, 2000 at 03:13:33AM -0400
On Fri, Oct 27, 2000 at 03:13:33AM -0400, Alexander Viro wrote:
>
>
> On Fri, 27 Oct 2000, Jeff V. Merkey wrote:
>
> >
> > Linux has lots of n-sqared linear list searches all over the place, and
> > there's a ton of spots I've seen it go linear by doing fine grained
> > manipulation of lock_kernel() [like in BLOCK.C in NWFS for sending async
> > IO to ll_rw_block()]. I could see where there would be many spots
> > where playing with this would cause problems.
> >
> > 2.5 will be better.
>
> fs/locks.c is one hell of a sick puppy. Nothing new about that. I'm kinda
> curious about "n-squared" searches in other places, though - mind showing
> them?
I've noticed in 2.2.X if I hold lock_kernel() over multiple calls to
ll_rw_block() while feeding it chains of buffer heads > 100 at a time
(one would think this would make the elevator get better numbers by
feeding it a bunch of buffer heads at once rahter than feeding them in
one at a time), performance gets slower rather than faster. I did
some profiling, and ll_rw_block() and functions beneath it was using a
lot of cycles. I think there may be cases where the code that
does the merging and sorting is hitting (O)(N)**2 instead of (O)(N).
When I compare the profile numbers to the buffer head window in
between calls to ll_rw_block(), the relationship is not (O)(N).
By default I just hold lock_kernel() over the calls to ll_rw_block()
for each buffer head in 2.2.X.
2.4 does not need lock_kernel() to be called any longer since ll_rw_block()
is now multi-threaded. The overall model of intereaction has not changed
in 2.4 from 2.2 much. I just no longer have to provide the serialization
for ll_rw_block() because it's provided underneath now, but what I saw
indicates that as the request list gets full, some of the logic is
not performing at a relationship of (O)(N) # requests vs. utilization.
This would indicate somewhere down in that code, there's a spot where
we end up spinning sround a lot mucking with lists or something.
:-)
Jeff
>
> BTW, what spinlocks get contention in variant without BKL? And what about
> comparison between the BKL and non-BKL versions? If it's something like
> BKL no BKL
> 4-way 50 20
> 8-way 30 30
> - something is certainly wrong, but restoring the BKL is _not_ a win.
>
> I didn't look into recent changes in fs/locks.c, but I have quite problem
> inventing a scenario when _adding_ BKL (without reverting other changes)
> might give an absolute improvement. Well, I see a couple of really perverted
> scenarios, but... Seriously, folks, could you compare the 4 variants above
> and gather the contention data for the -test9 on your loads? That would help
> a lot.
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-10-27 8:22 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200010250736.QAA12373@asami.proc.flab.fujitsu.co.jp>
[not found] ` <Pine.LNX.4.21.0010251242050.943-100000@duckman.distro.conectiva>
[not found] ` <200010260138.KAA17028@asami.proc.flab.fujitsu.co.jp>
[not found] ` <200010261405.XAA19135@asami.proc.flab.fujitsu.co.jp>
2000-10-27 6:24 ` Negative scalability by removal of lock_kernel()? (Was: Strange performance behavior of 2.4.0-test9) kumon
2000-10-27 6:32 ` Negative scalability by removal of lock_kernel()?(Was: " Jeff V. Merkey
2000-10-27 7:13 ` Alexander Viro
2000-10-27 7:46 ` Andi Kleen
2000-10-27 10:23 ` Andrew Morton
2000-10-27 10:25 ` Andi Kleen
2000-10-27 12:57 ` [PATCH] " kumon
2000-10-28 15:46 ` Andrew Morton
2000-10-28 15:58 ` Andi Kleen
2000-10-28 16:05 ` Jeff Garzik
2000-10-28 16:20 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was: Alan Cox
2000-10-29 19:45 ` dean gaudet
2000-10-30 6:29 ` Andi Kleen
2000-10-30 15:28 ` Andrea Arcangeli
2000-10-30 16:36 ` Rik van Riel
2000-10-30 18:02 ` Andrea Arcangeli
2000-10-28 16:46 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was: Strange performance behavior of 2.4.0-test9) Andrew Morton
2000-10-30 9:27 ` kumon
2000-10-30 15:00 ` Andrew Morton
2000-10-30 23:24 ` dean gaudet
2000-11-04 5:08 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was:Strange " Andrew Morton
2000-11-04 6:23 ` Linus Torvalds
2000-11-04 10:54 ` [PATCH] Re: Negative scalability by removal of Alan Cox
2000-11-04 17:22 ` Linus Torvalds
2000-11-05 16:22 ` Andrea Arcangeli
2000-11-05 20:21 ` dean gaudet
2000-11-05 22:43 ` Alan Cox
2000-11-04 20:03 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was:Strange performance behavior of 2.4.0-test9) dean gaudet
2000-11-04 20:42 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was:Strange Alan Cox
2000-11-04 20:11 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was:Strange performance behavior of 2.4.0-test9) dean gaudet
2000-11-04 20:43 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was:Strange Alan Cox
2000-11-05 4:52 ` dean gaudet
2000-10-31 15:36 ` [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was: Strange performance behavior of 2.4.0-test9) Andrew Morton
2000-11-01 1:02 ` kumon
2000-11-02 11:09 ` kumon
2000-11-02 12:50 ` kumon
2000-11-04 5:07 ` Andrew Morton
2000-10-27 8:17 ` Jeff V. Merkey [this message]
2000-10-27 10:11 ` kumon
2000-11-04 5:55 ` Preemptive scheduling of woken-up processes kumon
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=20001027021750.A2944@vger.timpanogas.org \
--to=jmerkey@vger.timpanogas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@math.psu.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