From: Zach Brown <zach.brown@oracle.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
mingo@goodmis.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [HACK] convert i_alloc_sem for direct_io.c craziness!
Date: Tue, 2 Oct 2007 11:03:14 -0700 [thread overview]
Message-ID: <AE007B59-E6EB-4E4F-BAC4-7D49D61D1932@oracle.com> (raw)
In-Reply-To: <1191271156.5574.9.camel@lappy>
On Oct 1, 2007, at 1:39 PM, Peter Zijlstra wrote:
>
> On Mon, 2007-10-01 at 12:52 -0700, Zach Brown wrote:
>
>> Do you have any suggestions for locking constructs that RT would
>> prefer?
>
> Basically, anything that maps to a simple mutex. Anything more complex
> gets real messy real quick.
I'm worried that the aio+dio implementation of concurrent pending IOs
just doesn't map well to PI.
Would a hack with a mutex and counts help at all? It seems like it
would still have the same problem. The count increments don't
transfer ownership to the count decrements and the wake up.
io submission from tasks:
down(&inode->i_mutex);
atomic_inc(&inode->in_flight);
up(&inode->i_mutex);
io completion from interrupts:
if(atomic_dec_and_test(&inode->in_flight))
wake_up(&inode->waiting);
file allocation in tasks:
down(&inode->i_mutex);
wait_event(inode->waiting, atomic_read(&inode->in_flight) == 0);
up(&inode->i_mutex);
(yeah, yeah, starvation -- it's just a demonstration)
In any case, this seems like it's not a very high priority now that
RT has Steven's work-around. If it does become a priority can you
guys let linux-fsdevel know?
- z
next prev parent reply other threads:[~2007-10-02 18:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 21:14 Steven Rostedt
2007-09-25 12:42 ` Peter Zijlstra
2007-09-25 15:29 ` [PATCH RT] Don't let -rt rw_semaphors do _non_owner locks Steven Rostedt
2007-10-01 19:52 ` [HACK] convert i_alloc_sem for direct_io.c craziness! Zach Brown
2007-10-01 20:39 ` Peter Zijlstra
2007-10-02 18:03 ` Zach Brown [this message]
2007-10-02 18:12 ` Steven Rostedt
2007-10-02 18:18 ` Zach Brown
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=AE007B59-E6EB-4E4F-BAC4-7D49D61D1932@oracle.com \
--to=zach.brown@oracle.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@goodmis.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®