All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Huey (hui) <bhuey@lnxw.com>
To: Bill Davidsen <davidsen@tmr.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	"Bill Huey (hui)" <bhuey@lnxw.com>
Subject: Re: [patch] remove the BKL (Big Kernel Lock), this time for real
Date: Thu, 16 Sep 2004 15:29:03 -0700	[thread overview]
Message-ID: <20040916222903.GA4089@nietzsche.lynx.com> (raw)
In-Reply-To: <cic7f9$i4m$1@gatekeeper.tmr.com>

On Thu, Sep 16, 2004 at 10:28:08AM -0400, Bill Davidsen wrote:
> Is that (necessarily) a bad thing? If it results in less time waiting 
> for BKL, and/or more time doing user work, that may drive throughput and 
> responsiveness up. It depends if the time for two ctx is greater or less 
> than the spin time on BKL.
> 
> It would be nice to have the best of both worlds, use the semaphore if 
> there is a process on the run queue, and spin if not. That sounds 
> complex, and hopefully not worth the effort.

FreeBSD-current uses adaptive mutexes. However they spin on that mutex
only if the thread owning it is running across another CPU at that time,
otherwise it sleeps, maybe priority inherited depending on the
circumstance. It's kind of heavy weight, I know, but it might be a good
place to look for an example implementation of this thing.

I'm sure that a simplified adaptive mutex can be used that's compatible
with the Linux SMP/preemption methology if this becomes relevant.

> High ctx rates are not necessarily bad, when we implemented O_DIRECT for 
> an application the rate went up 30%, the outbound bandwidth went up 
> 10-15%, and waitio dropped by half at peak load. As long as something 
> useful is being done with the time previously wasted in spinning, I 
> would expect it to be a win.

It's critical for other devices as well, like keeping a GPU fully engaged
so that there isn't computational stalls since the process queue is empty,
etc...

Anybody thought about using this to protect RCU-ed critical sections yet
even though it doesn't guarantee quiescience ? or has the recent work
softirq-ing them sufficient ? Can't this be used as a kind per CPU-local
data guard much like {get,set}_cpu() and friends ?

bill


  reply	other threads:[~2004-09-16 22:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2EJTp-7bx-1@gated-at.bofh.it>
2004-09-15 15:46 ` [patch] remove the BKL (Big Kernel Lock), this time for real Andi Kleen
2004-09-15 15:58   ` Ingo Molnar
2004-09-15 20:11   ` Ingo Molnar
2004-09-16  1:17     ` Nick Piggin
2004-09-16 14:28   ` Bill Davidsen
2004-09-16 22:29     ` Bill Huey [this message]
2004-09-16 22:40       ` David S. Miller
2004-09-16 22:51         ` Bill Huey
2004-09-16 22:54           ` David S. Miller
2004-09-16 23:01             ` Bill Huey
2004-09-16 23:33             ` William Lee Irwin III
2004-09-17  6:43           ` Ingo Molnar
2004-09-17  7:21             ` Tony Lee
2004-09-18  5:44 Manfred Spraul
2004-09-18 13:09 ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2004-09-15 15:18 Ingo Molnar
2004-09-15 15:40 ` Linus Torvalds
2004-09-15 15:55   ` Ingo Molnar
2004-09-15 17:04     ` Ricky Beam
2004-09-15 19:39       ` Ingo Molnar
2004-09-15 18:28     ` Chris Wedgwood
2004-09-15 21:25   ` William Lee Irwin III
2004-09-17 10:39 ` Ingo Molnar
2004-09-17 12:53   ` Ingo Molnar
2004-09-17 20:56     ` Andrea Arcangeli
2004-09-18  8:02       ` Ingo Molnar
2004-09-18 23:36         ` Andrea Arcangeli
2004-09-17 13:26   ` Andrea Arcangeli
2004-09-17 13:47     ` William Lee Irwin III
2004-09-17 13:56       ` Andrea Arcangeli
2004-09-17 14:18         ` William Lee Irwin III
2004-09-17 15:16   ` Linus Torvalds

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=20040916222903.GA4089@nietzsche.lynx.com \
    --to=bhuey@lnxw.com \
    --cc=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.