Prev: [PATCH 1/9] mm: add generic adaptive large memory allocation APIs
Next: ramzswap: Remove backing swap support
From: Josef Bacik on 13 May 2010 14:00 On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote: > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > > 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, > > aio_complete does a spin_lock_irqsave before that, which disables > interrupts on the local CPU. > Ok how about I just do local_irq_disable() kmap(KM_IRQ0) local_irq_enable() would that be acceptable? Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Andrew Morton on 13 May 2010 14:20 On Thu, 13 May 2010 14:01:37 -0400 Josef Bacik <josef(a)redhat.com> wrote: > On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote: > > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > > > 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, > > > > aio_complete does a spin_lock_irqsave before that, which disables > > interrupts on the local CPU. > > > > Ok how about I just do > > local_irq_disable() > kmap(KM_IRQ0) > local_irq_enable() > > would that be acceptable? Thanks, yup. local_irq_disable() (or local_irq_save()) kmap_atomic(KM_IRQx); <stuff> kunmap_atomic(KM_IRQx); local_irq_enable() (or local_irq_restore()). then perhaps flush_dcache_page(). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Josef Bacik on 13 May 2010 14:40 On Thu, May 13, 2010 at 11:11:36AM -0700, Andrew Morton wrote: > On Thu, 13 May 2010 14:01:37 -0400 > Josef Bacik <josef(a)redhat.com> wrote: > > > On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote: > > > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote: > > > > 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, > > > > > > aio_complete does a spin_lock_irqsave before that, which disables > > > interrupts on the local CPU. > > > > > > > Ok how about I just do > > > > local_irq_disable() > > kmap(KM_IRQ0) > > local_irq_enable() > > > > would that be acceptable? Thanks, > > yup. > > local_irq_disable() (or local_irq_save()) > kmap_atomic(KM_IRQx); > <stuff> > kunmap_atomic(KM_IRQx); > local_irq_enable() (or local_irq_restore()). > > then perhaps flush_dcache_page(). Great, thank you, I will fix this up and resend. Josef -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
First
|
Prev
|
Pages: 1 2 Prev: [PATCH 1/9] mm: add generic adaptive large memory allocation APIs Next: ramzswap: Remove backing swap support |