public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Nathan Lynch <ntl@pobox.com>,
	viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-2.6 04/04] brsem: convert cpucontrol to brsem
Date: Mon, 26 Sep 2005 13:05:28 +0900	[thread overview]
Message-ID: <43377388.9000004@gmail.com> (raw)
In-Reply-To: <43374AC6.8070805@yahoo.com.au>


  Hello, Nathan & Nick.

Nick Piggin wrote:
> Nathan Lynch wrote:
> 
>> Nick Piggin wrote:
>>
>>>
>>> Note that I happen to also think the idea (brsems) have merit, and
>>> that cpucontrol may be one of the places where a sane implementation
>>> would actually be useful... but at least when you're introducing
>>> this kind of complexity anywhere, you *really* need to be able to
>>> back it up with numbers.
>>>
>>
>> The only performance-related complaint with cpu hotplug of which I'm
>> aware -- that taking a cpu down on a large system can be painfully
>> slow -- resides in the "write side" of the code, which is not the case
>> that the brsem implementation optimizes.  I think this patch would
>> make that case even worse.  So I don't think it's appropriate to use a
>> brsem for cpu hotplug, especially without trying rwsem first.
>>
>>

  Actually, a patch which converts cpucontrol to rwsem was once in -mm. 
  I don't know what happened to it.  I can't see it in 2.6.13-rc2-mm1.

> 
> I'm not sure that a brsem would make a noticable difference.
> 
> It isn't that cpu hotplug semaphore is a performance problem
> now, but that it isn't being used in as many cases as it could
> be due to its unscalable nature. For example, a while back I
> wanted to use it in the fork() path in the scheduler but
> couldn't.

  I couldn't have put it better.  As it currently stands, cpucontrol 
doesn't have any heavy readers.  It's partly because it's not necessary 
but at least for some part it's because it cannot be used in such cases 
as the overhead is too big.  The same is true for super->s_umount rwsem 
- read_down'ing per-fs rwsem on every write(2) will hurt performance on 
SMP machines.  I think we'll have more and more of this class of 
synchronization problems as we add hotplug capability to subsystems.

  Having spent a week on implementing something very ugly :-), I'm a bit 
embarrased here but I still want to point out that we need something to 
solve this problem.

> Anyway, as I said, you need to be able to back it up with
> numbers ;)

  Right, gotta benchmark before committing full implementation.

  Thanks.

-- 
tejun

      reply	other threads:[~2005-09-26  4:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-25  6:43 [PATCH linux-2.6 00/04] brsem: [RFC] big reader semaphore Tejun Heo
2005-09-25  6:43 ` [PATCH linux-2.6 01/04] brsem: implement " Tejun Heo
2005-09-25  7:19   ` Nick Piggin
2005-09-25  8:03     ` Nick Piggin
2005-09-25  8:11     ` Tejun Heo
2005-09-25  8:27       ` Nick Piggin
2005-09-25  8:53         ` Tejun Heo
2005-09-25  9:24           ` Nick Piggin
2005-09-25 10:05             ` Tejun Heo
2005-09-25 11:22               ` Nick Piggin
2005-09-25  6:43 ` [PATCH linux-2.6 02/04] brsem: convert super_block->s_umount to brsem Tejun Heo
2005-09-25  6:43 ` [PATCH linux-2.6 03/04] brsem: fix ro-remount <-> open race condition Tejun Heo
2005-09-25  6:43 ` [PATCH linux-2.6 04/04] brsem: convert cpucontrol to brsem Tejun Heo
2005-09-25  7:39   ` Nick Piggin
2005-09-25  8:03     ` Tejun Heo
2005-09-25 23:46     ` Nathan Lynch
2005-09-26  1:11       ` Nick Piggin
2005-09-26  4:05         ` Tejun Heo [this message]

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=43377388.9000004@gmail.com \
    --to=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=ntl@pobox.com \
    --cc=viro@zeniv.linux.org.uk \
    /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