Skip to content

Commit 2224d87

Browse files
ddissidryomov
authored andcommitted
rbd: use GFP_NOIO consistently for request allocations
As of 5a60e87, RBD object request allocations are made via rbd_obj_request_create() with GFP_NOIO. However, subsequent OSD request allocations in rbd_osd_req_create*() use GFP_ATOMIC. With heavy page cache usage (e.g. OSDs running on same host as krbd client), rbd_osd_req_create() order-1 GFP_ATOMIC allocations have been observed to fail, where direct reclaim would have allowed GFP_NOIO allocations to succeed. Cc: stable@vger.kernel.org # 3.18+ Suggested-by: Vlastimil Babka <vbabka@suse.cz> Suggested-by: Neil Brown <neilb@suse.com> Signed-off-by: David Disseldorp <ddiss@suse.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 9735a22 commit 2224d87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/block/rbd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ static struct ceph_osd_request *rbd_osd_req_create(
19531953

19541954
osdc = &rbd_dev->rbd_client->client->osdc;
19551955
osd_req = ceph_osdc_alloc_request(osdc, snapc, num_ops, false,
1956-
GFP_ATOMIC);
1956+
GFP_NOIO);
19571957
if (!osd_req)
19581958
return NULL; /* ENOMEM */
19591959

@@ -2002,7 +2002,7 @@ rbd_osd_req_create_copyup(struct rbd_obj_request *obj_request)
20022002
rbd_dev = img_request->rbd_dev;
20032003
osdc = &rbd_dev->rbd_client->client->osdc;
20042004
osd_req = ceph_osdc_alloc_request(osdc, snapc, num_osd_ops,
2005-
false, GFP_ATOMIC);
2005+
false, GFP_NOIO);
20062006
if (!osd_req)
20072007
return NULL; /* ENOMEM */
20082008

@@ -2504,7 +2504,7 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request,
25042504
bio_chain_clone_range(&bio_list,
25052505
&bio_offset,
25062506
clone_size,
2507-
GFP_ATOMIC);
2507+
GFP_NOIO);
25082508
if (!obj_request->bio_list)
25092509
goto out_unwind;
25102510
} else if (type == OBJ_REQUEST_PAGES) {

0 commit comments

Comments
 (0)