xen-blkfront: pre-allocate pages for requests
commit9c1e050caeb4d1250f8ceef1180a8b3d0db6c624
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 18 Mar 2013 16:49:35 +0000 (18 17:49 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 19 Mar 2013 16:50:06 +0000 (19 12:50 -0400)
treeb3fb576a47d4a86005de189da69fde0d8a22072b
parentffb1dabd1eb10c76a1e7af62f75a1aaa8d590b5a
xen-blkfront: pre-allocate pages for requests

This prevents us from having to call alloc_page while we are preparing
the request. Since blkfront was calling alloc_page with a spinlock
held we used GFP_ATOMIC, which can fail if we are requesting a lot of
pages since it is using the emergency memory pools.

Allocating all the pages at init prevents us from having to call
alloc_page, thus preventing possible failures.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xen.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkfront.c