From: Ray Bryant <raybry@sgi.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
lse-tech <lse-tech@lists.sourceforge.net>,
holt@sgi.com, Dean Roe <roe@sgi.com>, Brian Sumner <bls@sgi.com>,
John Hawkes <hawkes@tomahawk.engr.sgi.com>
Subject: Re: [Lse-tech] Re: scalability of signal delivery for Posix Threads
Date: Mon, 22 Nov 2004 13:49:21 -0600 [thread overview]
Message-ID: <41A242C1.10600@sgi.com> (raw)
In-Reply-To: <20041122160705.GG25636@parcelfarce.linux.theplanet.co.uk>
Matthew Wilcox wrote:
> On Mon, Nov 22, 2004 at 09:51:15AM -0600, Ray Bryant wrote:
>
>>Since signals are sent much more often than sigaction() is called, it would
>>seem to make more sense to make sigaction() take a heavier weight lock of
>>some kind (to update the signal handler decription) and to have the signal
>>delivery mechanism take a lighter weight lock. Making
>>current->sighand->siglock a rwlock_t really doesn't improve the situation
>>much, since cache line contention is just a severe in that case (if not
>>worse) than it is with the current definition.
>
>
> What about RCU or seqlock?
>
Well, the sighand->siglock is taken so many places in the kernel (>200 times)
that RCUing its usage looks like a daunting change to make.
In principle, I guess a seqlock could be made to work. The idea would be that
we'd want to get a consistent copy of the sighand structure in the presence
of very rare updates. Once again, I'd have to modify all of those code
paths mentioned above.
Since a seqlock was created AFAIK as an alternate to a brlock, and the
global/local locking structure I described before is more or less equivalent
to a brlock, I think we are thinking along similar lines.
For me, converting spinlock_irqsave(&p->sighand->siglock) to
spinlock_irqsave(&p->siglock) and then checking to make sure that
only task local data is updated in the critical section is an easier
way to go than modifying each of the code paths to deal with the
"failure" case for a seqlock. But I could be proven wrong.
Anyway, Andi makes a good point -- if I can fast patch SIGPROF handling,
then I may have a more localized change, and that is a good thing [tm].
--
Best Regards,
Ray
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
raybry@sgi.com raybry@austin.rr.com
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------
next prev parent reply other threads:[~2004-11-22 19:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-22 15:51 scalability of signal delivery for Posix Threads Ray Bryant
2004-11-22 16:07 ` Matthew Wilcox
2004-11-22 19:49 ` Ray Bryant [this message]
2004-11-22 19:53 ` [Lse-tech] " Andi Kleen
2004-11-22 16:22 ` [Lse-tech] " Andi Kleen
2004-11-22 16:51 ` Andreas Schwab
2004-11-22 16:54 ` Andi Kleen
2004-11-22 18:56 ` Ray Bryant
2004-11-22 19:22 ` Ray Bryant
2004-11-22 17:23 ` Philip J. Mucci
2004-11-22 17:19 ` Robin Holt
2004-11-22 19:25 ` Ray Bryant
2004-11-23 20:42 ` Ray Bryant
2004-11-22 21:27 ` [Lse-tech] " Rick Lindsley
2004-11-22 23:39 ` Ray Bryant
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=41A242C1.10600@sgi.com \
--to=raybry@sgi.com \
--cc=bls@sgi.com \
--cc=hawkes@tomahawk.engr.sgi.com \
--cc=holt@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=matthew@wil.cx \
--cc=roe@sgi.com \
/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