login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
14
Re: [patch] rewrite rd
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Jens Axboe
Subject:
Re: [patch] rewrite rd
Date: Monday, January 14, 2008 - 10:21 am
On Mon, Jan 14 2008, Matthew Wilcox wrote:
quoted text
> On Tue, Dec 04, 2007 at 05:26:28AM +0100, Nick Piggin wrote: > > +static void copy_to_brd(struct brd_device *brd, const void *src, > > + sector_t sector, size_t n) > > +{ > > + struct page *page; > > + void *dst; > > + unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; > > + size_t copy; > > + > > + copy = min((unsigned long)n, PAGE_SIZE - offset); > > + page = brd_lookup_page(brd, sector); > > + BUG_ON(!page); > > + > > + dst = kmap_atomic(page, KM_USER1); > > + memcpy(dst + offset, src, copy); > > + kunmap_atomic(dst, KM_USER1); > > You're using kmap_atomic, but I see no reason you can't be preempted. > Don't you need to at least disable preemption while you have stuff > atomically kmapped?
kmap_atomic() disables preemption through pagefault_disable(). -- Jens Axboe --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch] rewrite rd
, Nick Piggin
, (Mon Dec 3, 9:26 pm)
Re: [patch] rewrite rd
, Andrew Morton
, (Mon Dec 3, 11:29 pm)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 12:01 am)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 12:08 am)
Re: [patch] rewrite rd
, Rob Landley
, (Tue Dec 4, 12:55 am)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 2:29 am)
Re: [patch] rewrite rd
, Christian Borntraeger
, (Tue Dec 4, 2:54 am)
Re: [patch] rewrite rd
, Nick Piggin
, (Tue Dec 4, 3:10 am)
[patch] rd: support XIP
, Nick Piggin
, (Tue Dec 4, 4:21 am)
[patch] ext2: xip check fix
, Nick Piggin
, (Tue Dec 4, 4:23 am)
Re: [patch] rd: support XIP
, Andrew Morton
, (Tue Dec 4, 4:26 am)
Re: [patch] rd: support XIP
, Nick Piggin
, (Tue Dec 4, 4:35 am)
Re: [patch] rd: support XIP
, Duane Griffin
, (Tue Dec 4, 5:06 am)
[patch] mm: fix XIP file writes
, Nick Piggin
, (Tue Dec 4, 6:00 am)
[patch] rd: support XIP (updated)
, Nick Piggin
, (Tue Dec 4, 6:03 am)
Re: [patch] rewrite rd
, Rob Landley
, (Tue Dec 4, 12:53 pm)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Wed Dec 5, 8:43 am)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Wed Dec 5, 4:33 pm)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Thu Dec 6, 1:43 am)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Thu Dec 6, 1:52 am)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Thu Dec 6, 2:59 am)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Thu Dec 6, 3:18 am)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Thu Dec 6, 3:24 am)
Re: [patch] ext2: xip check fix
, Rob Landley
, (Thu Dec 6, 11:11 am)
Re: [patch] ext2: xip check fix
, Jared Hulbert
, (Thu Dec 6, 8:22 pm)
Re: [patch] ext2: xip check fix
, Rob Landley
, (Thu Dec 6, 9:17 pm)
Re: [patch] ext2: xip check fix
, Nick Piggin
, (Thu Dec 6, 9:23 pm)
Re: [patch] ext2: xip check fix
, Jared Hulbert
, (Thu Dec 6, 9:40 pm)
Re: [patch] ext2: xip check fix
, Carsten Otte
, (Fri Dec 7, 1:59 am)
Re: [patch] ext2: xip check fix
, Jared Hulbert
, (Fri Dec 7, 2:52 am)
Re: [patch] mm: fix XIP file writes
, Christian Borntraeger
, (Mon Dec 10, 7:38 am)
Re: [patch] mm: fix XIP file writes
, Nick Piggin
, (Tue Dec 11, 9:03 pm)
Re: [patch] rewrite rd
, Matthew Wilcox
, (Mon Jan 14, 9:47 am)
Re: [patch] rewrite rd
, Jens Axboe
, (Mon Jan 14, 10:21 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wol