From: Oleg Nesterov <oleg@redhat.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: stephane eranian <eranian@googlemail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
mingo@elte.hu, linux-kernel@vger.kernel.org, tglx@linutronix.de,
robert.richter@amd.com, paulus@samba.org, andi@firstfloor.org,
mpjohn@us.ibm.com, cel@us.ibm.com, cjashfor@us.ibm.com,
mucci@eecs.utk.edu, terpstra@eecs.utk.edu,
perfmon2-devel@lists.sourceforge.net,
mtk.manpages@googlemail.com, roland@redhat.com
Subject: Re: F_SETOWN_TID: F_SETOWN was thread-specific for a while
Date: Mon, 17 Aug 2009 19:05:14 +0200 [thread overview]
Message-ID: <20090817170514.GA15907@redhat.com> (raw)
In-Reply-To: <20090811131009.GB29354@shareable.org>
Sorry for late reply.
And I am a bit confused.
On 08/11, Jamie Lokier wrote:
>
> Oleg Nesterov wrote:
> > Agreed, this looks a bit odd. But at least this is documented. From
> > man 2 fcntl:
> >
> > By using F_SETSIG with a nonzero value, and setting SA_SIGINFO
> > for the signal handler (see sigaction(2)), extra information
> > about I/O events is passed to the handler in a siginfo_t
> > structure. If the si_code field indicates the source is
> > SI_SIGIO, the si_fd field gives the file descriptor associated
> > with the event. Otherwise, there is no indication which file
> > descriptors are pending,
> >
> > Not sure if it is safe to change the historical behaviour.
>
> The change in 2.6.12 breaks some code of mine, which uses RT queued
> I/O signals on multiple threads but as far as I know it's not used
> anywhere now.
>
> In the <= 2.4 era, there were lots of web servers and benchmarks using
> queued I/O signals for scalable event-driven I/O, but I don't know of
> any implementation who dared do it with multiple threads, except mine.
>
> It was regarded as "beware ye who enter here" territory, which I can
> attest to from the long time it took to get it right and the multitude
> of kernel bugs and version changes needing to be worked around.
>
> Since 2.6, everyone uses epoll which is much better, except that
> occasionally SIGIO comes in handy when an async notification is
> required.
>
> So the change in 2.6.12 does break something that probably isn't much
> used, but it's too late now.
So, you seem to agree we should not change this odd behaviour?
> Occasionally thread-specific SIGIO (or
> F_SETSIG) is useful; F_SETOWN_TID makes that nice and clear.
Great. If you agree with F_SETOWN_TID, could you look at the next
Peter's patch
"[PATCH 3/2 -v4] fcntl: F_[SG]ETOWN_EX"
http://marc.info/?l=linux-kernel&m=124956452125468
and ack it?
> I would drop the pseudo-"bug compatible" behaviour of using negative
> tid to mean pid; that's pointless.
done,
> I'd also make F_GETOWN return an
> error when F_SETOWN_TID has been used,
This is not trivial, F_GETOWN can't return the error. A negative
result means PIDTYPE_PGID.
> and F_GETOWN_TID return an
> error when F_SETOWN has been used.
F_GETOWN_EX does this even better.
Oleg.
next prev parent reply other threads:[~2009-08-17 17:09 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 16:51 perf_counters issue with self-sampling threads stephane eranian
2009-07-27 16:56 ` Peter Zijlstra
2009-07-27 21:25 ` Andi Kleen
[not found] ` <7c86c4470907272213w2ee57080re50dd22a4d73a7e0@mail.gmail.com>
2009-07-28 8:51 ` stephane eranian
2009-07-28 8:56 ` Andi Kleen
2009-07-28 9:13 ` stephane eranian
2009-08-04 16:09 ` stephane eranian
2009-07-29 12:19 ` Peter Zijlstra
2009-07-29 12:37 ` stephane eranian
2009-07-29 12:46 ` Peter Zijlstra
2009-07-29 22:17 ` Oleg Nesterov
2009-07-30 11:31 ` Peter Zijlstra
2009-07-30 19:20 ` Oleg Nesterov
2009-07-30 20:00 ` Peter Zijlstra
2009-07-30 20:28 ` Oleg Nesterov
2009-07-30 21:09 ` stephane eranian
2009-07-31 8:35 ` [RFC][PATCH] fcntl: F_[SG]ETOWN_TID Peter Zijlstra
2009-07-31 14:01 ` stephane eranian
2009-07-31 20:52 ` Oleg Nesterov
2009-07-31 21:11 ` Andrew Morton
2009-08-01 1:27 ` [PATCH 0/2] send_sigio/do_send_sig_info (Was: [RFC][PATCH] fcntl: F_[SG]ETOWN_TID) Oleg Nesterov
2009-08-03 15:48 ` [PATCH 3/2] fcntl: F_[SG]ETOWN_TID Peter Zijlstra
2009-08-03 17:16 ` Oleg Nesterov
2009-08-03 17:47 ` Peter Zijlstra
2009-08-03 18:06 ` Oleg Nesterov
2009-08-03 18:36 ` Peter Zijlstra
2009-08-03 19:02 ` Oleg Nesterov
2009-08-04 11:39 ` [PATCH 3/2 -v3] fcntl: F_[SG]ETOWN_EX Peter Zijlstra
2009-08-04 16:20 ` Oleg Nesterov
2009-08-04 16:52 ` Peter Zijlstra
2009-08-04 17:19 ` Oleg Nesterov
2009-08-06 13:14 ` [PATCH 3/2 -v4] " Peter Zijlstra
2009-08-06 19:05 ` Oleg Nesterov
2009-08-07 12:10 ` stephane eranian
2009-08-01 1:28 ` [PATCH 1/2] signals: introduce do_send_sig_info() helper Oleg Nesterov
2009-08-01 1:28 ` [PATCH 2/2] signals: send_sigio: use do_send_sig_info() to avoid check_kill_permission() Oleg Nesterov
2009-08-03 12:53 ` [RFC][PATCH] fcntl: F_[SG]ETOWN_TID stephane eranian
2009-08-09 5:46 ` F_SETOWN_TID: F_SETOWN was thread-specific for a while Jamie Lokier
2009-08-10 12:22 ` stephane eranian
2009-08-10 17:03 ` Oleg Nesterov
2009-08-10 21:01 ` stephane eranian
2009-08-17 17:16 ` Oleg Nesterov
2009-08-17 17:40 ` Oleg Nesterov
2009-08-17 22:26 ` stephane eranian
2009-08-18 11:45 ` Oleg Nesterov
2009-08-20 10:00 ` stephane eranian
2009-08-11 13:10 ` Jamie Lokier
2009-08-17 17:05 ` Oleg Nesterov [this message]
2009-08-03 15:21 ` [RFC][PATCH] fcntl: F_[SG]ETOWN_TID Peter Zijlstra
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=20090817170514.GA15907@redhat.com \
--to=oleg@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=cel@us.ibm.com \
--cc=cjashfor@us.ibm.com \
--cc=eranian@googlemail.com \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mpjohn@us.ibm.com \
--cc=mtk.manpages@googlemail.com \
--cc=mucci@eecs.utk.edu \
--cc=paulus@samba.org \
--cc=perfmon2-devel@lists.sourceforge.net \
--cc=robert.richter@amd.com \
--cc=roland@redhat.com \
--cc=terpstra@eecs.utk.edu \
--cc=tglx@linutronix.de \
/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
Powered by JetHome