* Re: [PATCH 2/2] loop: use interruptible lock in ioctls
[not found] ` <20180327000421.GC10054@bombadil.infradead.org>
@ 2018-03-28 13:18 ` David Sterba
2018-03-28 16:57 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: David Sterba @ 2018-03-28 13:18 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Omar Sandoval, linux-block, Jens Axboe, kernel-team,
linux-fsdevel
On Mon, Mar 26, 2018 at 05:04:21PM -0700, Matthew Wilcox wrote:
> On Mon, Mar 26, 2018 at 04:16:26PM -0700, Omar Sandoval wrote:
> > Even after the previous patch to drop lo_ctl_mutex while calling
> > vfs_getattr(), there are other cases where we can end up sleeping for a
> > long time while holding lo_ctl_mutex. Let's avoid the uninterruptible
> > sleep from the ioctls.
>
> Umm ... you want these ioctls to return -EINTR just because you resized
> an xterm? I think you really meant mutex_lock_killable().
Does that really happen? In some cases (namely user called ioctls) I'd
like to allow ctrl-c to interrupt a mutex_lock or other _interruptible
actions. I'd be very surprised if resizing terminal stops the command
I've just started.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] loop: use interruptible lock in ioctls
2018-03-28 13:18 ` [PATCH 2/2] loop: use interruptible lock in ioctls David Sterba
@ 2018-03-28 16:57 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2018-03-28 16:57 UTC (permalink / raw)
To: David Sterba
Cc: Omar Sandoval, linux-block, Jens Axboe, kernel-team,
linux-fsdevel
On Wed, Mar 28, 2018 at 03:18:52PM +0200, David Sterba wrote:
> On Mon, Mar 26, 2018 at 05:04:21PM -0700, Matthew Wilcox wrote:
> > On Mon, Mar 26, 2018 at 04:16:26PM -0700, Omar Sandoval wrote:
> > > Even after the previous patch to drop lo_ctl_mutex while calling
> > > vfs_getattr(), there are other cases where we can end up sleeping for a
> > > long time while holding lo_ctl_mutex. Let's avoid the uninterruptible
> > > sleep from the ioctls.
> >
> > Umm ... you want these ioctls to return -EINTR just because you resized
> > an xterm? I think you really meant mutex_lock_killable().
>
> Does that really happen? In some cases (namely user called ioctls) I'd
> like to allow ctrl-c to interrupt a mutex_lock or other _interruptible
> actions. I'd be very surprised if resizing terminal stops the command
> I've just started.
Resizing an xterm causes the xterm to send its child SIGWINCH. ctrl-c
will cause fatal_signal_pending() to become true, and mutex_lock_killable
to return -EINTR. mutex_lock_interruptible() will return -EINTR for any
signal (SIGPOLL, SIGWINCH, etc).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-28 16:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1522106130.git.osandov@fb.com>
[not found] ` <7ec1489d2ca54e886713efe5beb6dd379c2279b6.1522106130.git.osandov@fb.com>
[not found] ` <20180327000421.GC10054@bombadil.infradead.org>
2018-03-28 13:18 ` [PATCH 2/2] loop: use interruptible lock in ioctls David Sterba
2018-03-28 16:57 ` Matthew Wilcox
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).