From: Daniel Walker <dwalker@mvista.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
Frank Munzert <frankm@linux.vnet.ibm.com>,
mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: BUG: lock held when returning to user space
Date: Thu, 13 Mar 2008 10:56:14 -0700 [thread overview]
Message-ID: <1205430974.10894.86.camel@localhost.localdomain> (raw)
In-Reply-To: <1205429946.8514.255.camel@twins>
On Thu, 2008-03-13 at 18:39 +0100, Peter Zijlstra wrote:
> > These need to be removed, but the usage is clearly not compatible with
> > the mutex API ..
> >
> > If you convert them to atomic counts then you loose the sleeping aspect
> > of the semaphore, which you'd have to add back somehow.
> >
> > The only API that seems straight forward is using complete's .. Then you
> > get an atomic count and all the sleeping function calls you might want..
> > (include/linux/completion.h) The problem with complete's is that you
> > can't start them out at "1" or "completed" unless you actually run
> > complete() once during initialization (that's kind of ugly) ..
>
> A simple waitqueue would work.
I was just mulling over what the most straight forward way would be.. I
thought about wait queues, but the API didn't seem as easy to use a
completes..
Daniel
next prev parent reply other threads:[~2008-03-13 17:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 15:45 BUG: lock held when returning to user space Frank Munzert
2008-03-12 16:29 ` Vegard Nossum
2008-03-12 21:40 ` Jiri Kosina
2008-03-13 15:43 ` Daniel Walker
2008-03-13 17:39 ` Peter Zijlstra
2008-03-13 17:56 ` Daniel Walker [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-03-13 16:49 J.C. Pizarro
2007-10-27 14:19 Gabriel C
2007-10-27 15:12 ` Jiri Kosina
2007-10-27 15:28 ` Peter Zijlstra
2007-10-27 15:46 ` Andrew Morton
2007-10-28 11:12 ` Jiri Kosina
2007-10-29 12:20 ` Alessandro Zummo
2007-10-27 16:35 ` Linus Torvalds
2007-10-27 22:47 ` Jiri Kosina
2007-10-27 15:47 ` Arjan van de Ven
2007-10-27 16:09 ` Peter Zijlstra
2007-10-27 17:05 ` Arjan van de Ven
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=1205430974.10894.86.camel@localhost.localdomain \
--to=dwalker@mvista.com \
--cc=frankm@linux.vnet.ibm.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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