From: Bijan Mottahedeh Date: Fri, 21 Oct 2016 08:10:55 +0000 (-0400) Subject: sparc64: VDS should try indefinitely to allocate IO pages X-Git-Tag: v4.1.12-92~30^2~8 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=458f2bc3eebfa24c8c8ab96351fabed8f9d94b09;p=users%2Fjedix%2Flinux-maple.git sparc64: VDS should try indefinitely to allocate IO pages Orabug: 24924152 Signed-off-by: Bijan Mottahedeh Reviewd-by: Alexandre Chartre Signed-off-by: Allen Pais --- diff --git a/drivers/block/vds/vds_io.c b/drivers/block/vds/vds_io.c index 13d7301fbf2ab..f8473ad0d797d 100644 --- a/drivers/block/vds/vds_io.c +++ b/drivers/block/vds/vds_io.c @@ -1,7 +1,7 @@ /* * vds_io.c: LDOM Virtual Disk Server. * - * Copyright (C) 2014, 2015 Oracle. All rights reserved. + * Copyright (C) 2014, 2016 Oracle. All rights reserved. */ #include "vds.h" @@ -141,9 +141,12 @@ static int vds_io_alloc_pages(struct vds_io *io, unsigned long len) BUG_ON(len % PAGE_SIZE != 0); io->ord = get_order(len); - io->pages = alloc_pages(GFP_KERNEL | __GFP_COMP, io->ord); - if (!io->pages) - return -ENOMEM; + do { + io->pages = alloc_pages(GFP_KERNEL | __GFP_COMP | __GFP_NOWARN, + io->ord); + if (!io->pages) + msleep(10); + } while (!io->pages); io->npages = len >> PAGE_SHIFT; vdsdbg(MEM, "ord=%d pages=%p npages=%d\n", io->ord, io->pages,