From: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
arjan <arjan@infradead.org>
Subject: Do not deprecate binary semaphore or do allow mutex in software interrupt contexts
Date: Tue, 11 Sep 2007 10:29:19 -0700 (PDT) [thread overview]
Message-ID: <432622.65445.qm@web52004.mail.re2.yahoo.com> (raw)
Peter Zijlstra <peterz@infradead.org>:
> Yes it is.
Why do you think it is broken?
> If you have to wait a long time in an atomic context you've done
> something wrong.
I saw an implementation where there were two atomic contexts, one to initiate reading and another to complete the reading.
That way, there was no busy wait for a long time in an atomic context.
> If you're only reading it from an atomic context you
> might consider storing a copy that can be quickly updated and protect
> that using a spinlock.
You suggested that a user-space task read from the device.
But that includes more context switching and therefore consumes more resources than reading just from an atomic context.
> Not being too familiar with the timer stuff, it smells wrong what you
> say.
Why?
Wissenswertes für Bastler und Hobby Handwerker. BE A BETTER HEIMWERKER! www.yahoo.de/clever
next reply other threads:[~2007-09-11 17:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 17:29 Matti Linnanvuori [this message]
2007-09-11 19:22 ` Do not deprecate binary semaphore or do allow mutex in software interrupt contexts Arjan van de Ven
-- strict thread matches above, loose matches on Subject: below --
2007-09-12 5:39 Matti Linnanvuori
2007-09-11 16:20 Matti Linnanvuori
2007-09-11 16:50 ` Peter Zijlstra
2007-09-11 18:22 ` Arjan van de Ven
2007-09-11 13:20 Matti Linnanvuori
2007-09-11 14:36 ` Arjan van de Ven
2007-09-11 13:56 ` Alan Cox
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=432622.65445.qm@web52004.mail.re2.yahoo.com \
--to=mattilinnanvuori@yahoo.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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