+ mm-zsmalloc-avoid-unnecessary-iteration-in-get_pages_per_zspage.patch added to -mm tree

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

 



The patch titled
     Subject: mm/zsmalloc: avoid unnecessary iteration in get_pages_per_zspage()
has been added to the -mm tree.  Its filename is
     mm-zsmalloc-avoid-unnecessary-iteration-in-get_pages_per_zspage.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-zsmalloc-avoid-unnecessary-iteration-in-get_pages_per_zspage.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-zsmalloc-avoid-unnecessary-iteration-in-get_pages_per_zspage.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 ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Ganesh Mahendran <opensource.ganesh@xxxxxxxxx>
Subject: mm/zsmalloc: avoid unnecessary iteration in get_pages_per_zspage()

If we find a zspage with usage == 100%, there is no need to try other
zspages.

Link: http://lkml.kernel.org/r/1462425447-13385-1-git-send-email-opensource.ganesh@xxxxxxxxx
Signed-off-by: Ganesh Mahendran <opensource.ganesh@xxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/zsmalloc.c |    3 +++
 1 file changed, 3 insertions(+)

diff -puN mm/zsmalloc.c~mm-zsmalloc-avoid-unnecessary-iteration-in-get_pages_per_zspage mm/zsmalloc.c
--- a/mm/zsmalloc.c~mm-zsmalloc-avoid-unnecessary-iteration-in-get_pages_per_zspage
+++ a/mm/zsmalloc.c
@@ -770,6 +770,9 @@ static int get_pages_per_zspage(int clas
 		if (usedpc > max_usedpc) {
 			max_usedpc = usedpc;
 			max_usedpc_order = i;
+
+			if (max_usedpc == 100)
+				break;
 		}
 	}
 
_

Patches currently in -mm which might be from opensource.ganesh@xxxxxxxxx are

mm-zsmalloc-avoid-unnecessary-iteration-in-get_pages_per_zspage.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