From: Andrew Morton <akpm@linux-foundation.org>
To: Josef Bacik <josef@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3
Date: Thu, 13 May 2010 08:41:00 -0400 [thread overview]
Message-ID: <20100513084100.d06b266b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100513153145.GE27011@dhcp231-156.rdu.redhat.com>
On Thu, 13 May 2010 11:31:45 -0400 Josef Bacik <josef@redhat.com> wrote:
> On Thu, May 13, 2010 at 11:14:30AM -0400, Christoph Hellwig wrote:
> > On Wed, May 12, 2010 at 04:40:53PM -0400, Josef Bacik wrote:
> > > V1->V2
> > > -Use __blockdev_direct_IO instead of helper
> > > -Use KM_IRQ0 for kmap instead of KM_USER0
> >
> > I still don't think this is correct. The completion can come from
> > softirq and hardirq context, and possibly even normal process context.
> > You either need to check for all these, or you need to use the generic
> > complete in user context helper btrfs has available for other types
> > of I/O.
> >
>
> AIO's aio_complete does kmap with KM_IRQ0/1 and it gets called in the same
> context as the btrfs completion handler, so if it's ok for aio_complete it
> should be ok for btrfs right? Thanks,
>
Using KM_USERx from irq context is a horrid, horrid bug.
Using KM_IRQx with local interrupts enabled is a ditto.
It's OK to use KM_IRQx from process context as long as local interrupts
are disabled.
kmap slots are just per-cpu variables. Each one has a particular usage
convention: process-context-only, must-be-irq-safe, etc.
next prev parent reply other threads:[~2010-05-13 12:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 20:40 [PATCH 4/4] Btrfs: add basic DIO read/write support V3 Josef Bacik
2010-05-13 15:14 ` Christoph Hellwig
2010-05-13 15:31 ` Josef Bacik
2010-05-13 12:41 ` Andrew Morton [this message]
2010-05-13 15:26 ` Christoph Hellwig
2010-05-13 15:43 ` Josef Bacik
2010-05-13 18:01 ` Josef Bacik
2010-05-13 18:11 ` Andrew Morton
2010-05-13 18:39 ` Josef Bacik
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=20100513084100.d06b266b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.