linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
	Dave Chinner <david@fromorbit.com>, Dave Jones <davej@redhat.com>,
	Eric Sandeen <sandeen@sandeen.net>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	xfs@oss.sgi.com
Subject: Re: 3.14-rc2 XFS backtrace because irqs_disabled.
Date: Fri, 14 Feb 2014 00:09:02 +0000	[thread overview]
Message-ID: <20140214000902.GA3078@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20140213205146.GS18016@ZenIV.linux.org.uk>

On Thu, Feb 13, 2014 at 08:51:46PM +0000, Al Viro wrote:
> On Wed, Feb 12, 2014 at 09:44:11PM +0000, Al Viro wrote:
> 
> > I'll try to put something along those lines together, if you or Oleg don't
> > do it first.
> 
> OK, having looked at that stuff...
> 
> 1) things become much more compact if we finish conversion to get_signal()
> first.  Callers of get_signal_to_deliver() have k_sigaction and siginfo in
> pair of local variables; switching to ksignal will be neutral wrt stack
> footprint (it just gathers those two in one struct) *and* we are getting
> rid of passing struct siginfo * around.  With that done, we can change
> struct ksignal ->info with zero impact on the code in arch/*, and conversion
> makes sense on its own.  In the mainline we have it done for alpha, arm,
> openrisc, sparc and x86.  I've just put together preliminary (and completely
> untested) patches for arm64, m68k and um; doing the rest won't take long, but
> they'll obviously need to be tested.  It's a fairly safe conversion;
> I'd expect the worst bugs to be typos.

OK, there's a couple of tricks that allow to reorder that.  First of all,
temporary config symbol (ARCH_USES_KSIGNAL) selecting that stuff; if it's
not selected, we just have #define small_siginfo siginfo and
#define assign_sigqueue(info, q) WARN_ON((q) != NULL)
and that's it - most of the changes in core kernel consist of s/siginfo/small_&/
and non-trivial ones are under ifdef CONFIG_ARCH_USES_KSIGNAL for the time
being.  Small ifdefs, at that...

Once all architectures get converted, we'll just kill that config symbol and
make ifdefs unconditional.

Another is that we don't need to bother with task_work_add() at all; on
converted architectures we have signal_setup_done(..., ksig, ...) called after
each successful get_signal() (the first argument of signal_setup_done() is
"has sigframe setup failed" flag; we get there regardless of success or
failure of setup_...frame()).  So we can just have that sucker do
assign_sigqueue(&ksig->info, NULL) and be done with that - all this delayed
freeing is explicit now (and we don't get locking overhead, etc. of
task_work_add()).

If what I've got survives the local beating, I'll put it into signal.git,
throw the arch conversions I could test in there and ask on linux-arch for
help with the missing ones.  With any luck we'll get the full set by the
next merge window, at which point we'll be able to kill ifdefs.

  reply	other threads:[~2014-02-14  0:09 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 17:27 3.14-rc2 XFS backtrace because irqs_disabled Dave Jones
2014-02-11 21:08 ` Dave Chinner
2014-02-11 21:49   ` Eric Sandeen
2014-02-12  0:44     ` Dave Jones
2014-02-12  1:09       ` Al Viro
2014-02-12  2:52         ` Linus Torvalds
2014-02-12  4:03           ` Dave Jones
2014-02-12  4:22             ` Al Viro
2014-02-12  5:40               ` Dave Chinner
2014-02-12  5:50                 ` Dave Jones
2014-02-12  6:10                   ` Dave Chinner
2014-02-12  6:31                     ` Dave Chinner
2014-02-12  6:59                       ` Linus Torvalds
2014-02-12  8:13                         ` Tejun Heo
2014-02-12 12:44                           ` Steven Rostedt
2014-02-12  8:35                         ` Dave Chinner
2014-02-12 12:50                           ` Steven Rostedt
2014-02-12 12:40                         ` Steven Rostedt
2014-02-12 13:29                           ` Peter Zijlstra
2014-02-12 14:25                     ` Dave Jones
2014-02-12 21:14                       ` Dave Chinner
2014-02-12 15:57                     ` Eric Sandeen
2014-02-12  6:28                 ` Linus Torvalds
2014-02-12  7:18                   ` Dave Chinner
2014-02-14  0:24                     ` Dave Chinner
2014-02-14 16:01                       ` Dave Jones
2014-02-15 22:23                         ` Dave Chinner
2014-02-15 22:28                           ` Dave Jones
2014-02-15 22:43                             ` Linus Torvalds
2014-02-15 23:50                       ` Linus Torvalds
2014-02-18  1:27                         ` Dave Chinner
2014-02-12 11:39                   ` Al Viro
2014-02-12 20:13                     ` Linus Torvalds
2014-02-12 21:14                       ` Al Viro
2014-02-12 21:32                         ` Linus Torvalds
2014-02-12 21:44                           ` Al Viro
2014-02-13 20:51                             ` Al Viro
2014-02-14  0:09                               ` Al Viro [this message]
2014-02-14 13:25                               ` Christoph Hellwig
2014-02-14 13:29                                 ` Richard Weinberger
2014-02-14 15:20                                   ` Al Viro
2014-02-14 16:08                                     ` Oleg Nesterov
2014-02-13 17:40                           ` Oleg Nesterov
2014-02-13 17:58                             ` Linus Torvalds
2014-02-13 18:10                               ` Oleg Nesterov
2014-02-13 18:37                                 ` Oleg Nesterov
2014-02-15  5:25                               ` Al Viro
2014-02-15 14:27                                 ` Oleg Nesterov
2014-02-15 15:22                                   ` Al Viro
2014-02-15 15:33                                     ` Oleg Nesterov
2014-02-15 15:36                                     ` Al Viro
2014-02-15 15:58                                       ` Al Viro
2014-02-15 16:59                                         ` Al Viro
2014-02-15 17:43                                         ` Oleg Nesterov
2014-02-15 18:05                                           ` Al Viro
2014-02-15 18:45                                             ` Oleg Nesterov
2014-02-17 16:57                                               ` Oleg Nesterov
2014-02-17 17:40                                                 ` Al Viro
2014-02-17 17:46                                                   ` Oleg Nesterov
2014-02-17 17:54                                                     ` Al Viro
2014-02-14 16:13                           ` Christoph Hellwig
2014-02-14 16:16                             ` Al Viro
2014-02-14 16:18                               ` Al Viro
2014-02-14 16:19                               ` Christoph Hellwig
2014-02-15 14:46                                 ` Oleg Nesterov

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=20140214000902.GA3078@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=davej@redhat.com \
    --cc=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=sandeen@sandeen.net \
    --cc=torvalds@linux-foundation.org \
    --cc=xfs@oss.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;
as well as URLs for NNTP newsgroup(s).