+ lib-optimize-cpumask_next_and-v6.patch added to -mm tree

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

 



The patch titled
     Subject: lib-optimize-cpumask_next_and-v6
has been added to the -mm tree.  Its filename is
     lib-optimize-cpumask_next_and-v6.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/lib-optimize-cpumask_next_and-v6.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/lib-optimize-cpumask_next_and-v6.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: Clement Courbet <courbet@xxxxxxxxxx>
Subject: lib-optimize-cpumask_next_and-v6

 - Removed test for reference implementation, which was a temporary
   artifact.
 - Prettify test output.

Link: http://lkml.kernel.org/r/20171129095715.23430-1-courbet@xxxxxxxxxx
Signed-off-by: Clement Courbet <courbet@xxxxxxxxxx>
Cc: Yury Norov <ynorov@xxxxxxxxxxxxxxxxxx>
Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/bitmap.h   |    2 +-
 lib/find_bit_benchmark.c |   26 ++------------------------
 2 files changed, 3 insertions(+), 25 deletions(-)

diff -puN include/linux/bitmap.h~lib-optimize-cpumask_next_and-v6 include/linux/bitmap.h
--- a/include/linux/bitmap.h~lib-optimize-cpumask_next_and-v6
+++ a/include/linux/bitmap.h
@@ -87,7 +87,7 @@
  *                                      Position next zero bit in *addr >= bit
  *  find_next_bit(addr, nbits, bit)     Position next set bit in *addr >= bit
  *  find_next_and_bit(addr1, addr2, nbits, bit)
- *                                      Same as find_first_bit, but in
+ *                                      Same as find_next_bit, but in
  *                                      (*addr1 & *addr2)
  *
  */
diff -puN lib/find_bit_benchmark.c~lib-optimize-cpumask_next_and-v6 lib/find_bit_benchmark.c
--- a/lib/find_bit_benchmark.c~lib-optimize-cpumask_next_and-v6
+++ a/lib/find_bit_benchmark.c
@@ -114,28 +114,8 @@ static int __init test_find_next_and_bit
 	for (cnt = i = 0; i < BITMAP_LEN; cnt++)
 		i = find_next_and_bit(bitmap, bitmap2, BITMAP_LEN, i+1);
 	cycles = get_cycles() - cycles;
-	pr_err("find_next_and_bit: %ld cycles, %ld iterations\n", (long)cycles,
-		cnt);
-
-	return 0;
-}
-
-static int __init test_find_next_and_bit_ref(const void *bitmap,
-		const void *bitmap2, unsigned long len)
-{
-	unsigned long i, cnt;
-	cycles_t cycles;
-
-	cycles = get_cycles();
-	for (cnt = i = 0; i < BITMAP_LEN; cnt++)
-		while ((i = find_next_bit(bitmap, BITMAP_LEN, i + 1))
-			< BITMAP_LEN)
-			if (test_bit(i, bitmap2))
-				break;
-
-	cycles = get_cycles() - cycles;
-	pr_err("find_next_and_bit_ref: %ld cycles, %ld iterations\n",
-		(long)cycles, cnt);
+	pr_err("find_next_and_bit:\t\t%llu cycles, %ld iterations\n",
+		(u64)cycles, cnt);
 
 	return 0;
 }
@@ -153,7 +133,6 @@ static int __init find_bit_test(void)
 	test_find_next_zero_bit(bitmap, BITMAP_LEN);
 	test_find_last_bit(bitmap, BITMAP_LEN);
 	test_find_first_bit(bitmap, BITMAP_LEN);
-	test_find_next_and_bit_ref(bitmap, bitmap2, BITMAP_LEN);
 	test_find_next_and_bit(bitmap, bitmap2, BITMAP_LEN);
 
 	pr_err("\nStart testing find_bit() with sparse bitmap\n");
@@ -170,7 +149,6 @@ static int __init find_bit_test(void)
 	test_find_next_zero_bit(bitmap, BITMAP_LEN);
 	test_find_last_bit(bitmap, BITMAP_LEN);
 	test_find_first_bit(bitmap, BITMAP_LEN);
-	test_find_next_and_bit_ref(bitmap, bitmap2, BITMAP_LEN);
 	test_find_next_and_bit(bitmap, bitmap2, BITMAP_LEN);
 
 	/*
_

Patches currently in -mm which might be from courbet@xxxxxxxxxx are

lib-optimize-cpumask_next_and.patch
lib-optimize-cpumask_next_and-v6.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 Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux