+ drivers-misc-vmw_balloonc-determine-page-allocation-flag-can_sleep-outside-loop.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop
has been added to the -mm tree.  Its filename is
     drivers-misc-vmw_balloonc-determine-page-allocation-flag-can_sleep-outside-loop.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: Rakib Mullick <rakib.mullick@xxxxxxxxx>
Subject: drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop

In vmballoon_reserve_page(), flags has been passed from the callee
function (vmballoon_inflate here).  So, we can determine can_sleep outside
the loop.

Signed-off-by: Rakib Mullick <rakib.mullick@xxxxxxxxx>
Acked-by: Dmitry Torokhov <dtor@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxx>
---

 drivers/misc/vmw_balloon.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/misc/vmw_balloon.c~drivers-misc-vmw_balloonc-determine-page-allocation-flag-can_sleep-outside-loop drivers/misc/vmw_balloon.c
--- a/drivers/misc/vmw_balloon.c~drivers-misc-vmw_balloonc-determine-page-allocation-flag-can_sleep-outside-loop
+++ a/drivers/misc/vmw_balloon.c
@@ -412,6 +412,7 @@ static int vmballoon_reserve_page(struct
 	gfp_t flags;
 	unsigned int hv_status;
 	bool locked = false;
+	flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : VMW_PAGE_ALLOC_NOSLEEP;
 
 	do {
 		if (!can_sleep)
@@ -419,7 +420,6 @@ static int vmballoon_reserve_page(struct
 		else
 			STATS_INC(b->stats.sleep_alloc);
 
-		flags = can_sleep ? VMW_PAGE_ALLOC_CANSLEEP : VMW_PAGE_ALLOC_NOSLEEP;
 		page = alloc_page(flags);
 		if (!page) {
 			if (!can_sleep)
_
Subject: Subject: drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop

Patches currently in -mm which might be from rakib.mullick@xxxxxxxxx are

drivers-misc-vmw_balloonc-determine-page-allocation-flag-can_sleep-outside-loop.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux