public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: wait_event_interruptible() seems non-atomic
Date: Sat, 20 Nov 2004 19:31:22 +0100	[thread overview]
Message-ID: <419F8D7A.1020305@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.53.0411201718040.925@yvahk01.tjqt.qr>

Jan Engelhardt wrote:

>>For example the use of down_interruptible() looks wrong to me, I'd use
>>plain down().
>>    
>>
>
>I'd like to be able to hit Ctrl+C (in the userspace application) whenever
>possible. If that's not a reason, blame the book
>http://www.xml.com/ldd/chapter/book/ch03.html#t8 ("the read method" a further
>down below)
>
>  
>
As far as I can see BufferLock is only held for tiny sections - the 
longest thing is a copy_to_user(), i.e. at worst a swap in. I my opinion 
the delay for handling Ctrl+C is therefore negligible and not worth the 
added code for handling down_interruptible().
You have already written the code, so I'd leave it as it is and I'll 
blame the book. They probably started from an older version of 
fs/pipe.c, which contained _interruptible calls. There are gone now, 
this allowed some cleanup.

--
    Manfred

  reply	other threads:[~2004-11-20 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-20 16:16 wait_event_interruptible() seems non-atomic Manfred Spraul
2004-11-20 16:26 ` Jan Engelhardt
2004-11-20 18:31   ` Manfred Spraul [this message]
2004-11-21  9:40     ` Jan Engelhardt
2004-11-21 10:00       ` Manfred Spraul
2004-11-21 10:21         ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2004-11-20 15:35 Jan Engelhardt

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=419F8D7A.1020305@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    /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