+ tools-vm-page_owner_sortc-avoid-repeated-judgments.patch added to -mm tree

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

 



The patch titled
     Subject: tools/vm/page_owner_sort.c: avoid repeated judgments
has been added to the -mm tree.  Its filename is
     tools-vm-page_owner_sortc-avoid-repeated-judgments.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/tools-vm-page_owner_sortc-avoid-repeated-judgments.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/tools-vm-page_owner_sortc-avoid-repeated-judgments.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/process/submit-checklist.rst when testing your code ***

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

------------------------------------------------------
From: Yixuan Cao <caoyixuan2019@xxxxxxxxxxxxxxxx>
Subject: tools/vm/page_owner_sort.c: avoid repeated judgments

I noticed a detail that needs to be adjusted.  When judging whether a page
is allocated by vmalloc, the value of the variable "tmp" was repeatedly
judged, so the code was adjusted.

This work is coauthored by Yinan Zhang, Jiajian Ye, Shenghong Han, Chongxi
Zhao, Yuhong Feng and Yongqiang Liu.

Link: https://lkml.kernel.org/r/20220414042744.13896-1-caoyixuan2019@xxxxxxxxxxxxxxxx
Signed-off-by: Yixuan Cao <caoyixuan2019@xxxxxxxxxxxxxxxx>
Cc: Chongxi Zhao <zhaochongxi2019@xxxxxxxxxxxxxxxx>
Cc: Haowen Bai <baihaowen@xxxxxxxxx>
Cc: Jiajian Ye <yejiajian2018@xxxxxxxxxxxxxxxx>
Cc: Sean Anderson <seanga2@xxxxxxxxx>
Cc: Shenghong Han <hanshenghong2019@xxxxxxxxxxxxxxxx>
Cc: Yinan Zhang <zhangyinan2019@xxxxxxxxxxxxxxxx>
Cc: Yongqiang Liu <liuyongqiang13@xxxxxxxxxx>
Cc: Yuhong Feng <yuhongf@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


--- a/tools/vm/page_owner_sort.c~tools-vm-page_owner_sortc-avoid-repeated-judgments
+++ a/tools/vm/page_owner_sort.c
@@ -444,10 +444,8 @@ static int get_allocator(const char *buf
 			tmp--;
 		first_line = ++tmp;
 		tmp = strstr(tmp, "alloc_pages");
-		if (tmp) {
-			if (tmp && first_line <= tmp && tmp < second_line)
-				allocator |= ALLOCATOR_VMALLOC;
-		}
+		if (tmp && first_line <= tmp && tmp < second_line)
+			allocator |= ALLOCATOR_VMALLOC;
 	}
 	if (allocator == 0)
 		allocator = ALLOCATOR_OTHERS;
_

Patches currently in -mm which might be from caoyixuan2019@xxxxxxxxxxxxxxxx are

tools-vm-page_owner_sortc-provide-allocator-labelling-and-update-cull-and-sort-options.patch
tools-vm-page_owner_sortc-avoid-repeated-judgments.patch
mm-vmalloc-fix-a-comment.patch




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

  Powered by Linux