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: Sun, 21 Nov 2004 11:00:29 +0100 [thread overview]
Message-ID: <41A0673D.8030504@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.53.0411211039240.242@yvahk01.tjqt.qr>
Jan Engelhardt wrote:
>>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.
>>
>>
>
>Well, it's just one line so I would not care, and I'm also open for
>suggestions. Does down_interruptible() cost so much more in CPU cycles than
>down()?
>
>
>
It's more about code complexity than performance. down_interruptible()
means that you must handle failures - double check that you free all
temporary allocations, decrease all reference counts (make the reference
counts atomic_t), etc.
--
Manfred
next prev parent reply other threads:[~2004-11-21 10:00 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
2004-11-21 9:40 ` Jan Engelhardt
2004-11-21 10:00 ` Manfred Spraul [this message]
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=41A0673D.8030504@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