From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752191AbbJLPmr (ORCPT ); Mon, 12 Oct 2015 11:42:47 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:36042 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbbJLPmp (ORCPT ); Mon, 12 Oct 2015 11:42:45 -0400 Date: Mon, 12 Oct 2015 23:42:24 +0800 From: Boqun Feng To: Fengguang Wu Cc: kbuild-all@01.org, LKML Subject: Re: [lkp] [PATCH v3 2/6] atomics: Add test for atomic operations with _relaxed variants Message-ID: <20151012154224.GB1009@fixme-laptop.cn.ibm.com> References: <1444659246-24769-3-git-send-email-boqun.feng@gmail.com> <201510122205.Uu3yljqf%fengguang.wu@intel.com> <20151012145652.GJ27351@fixme-laptop.cn.ibm.com> <20151012152914.GB18440@wfg-t540p.sh.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline In-Reply-To: <20151012152914.GB18440@wfg-t540p.sh.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Fengguang, On Mon, Oct 12, 2015 at 11:29:14PM +0800, Fengguang Wu wrote: > Hi Boqun, >=20 > The base tree detection is based on the whole patchset's >=20 > - subjects > - touched files > - TO/CC list >=20 > Log shows the files and TO/CC are strongly related to powerpc, > so it looks a natural choice to apply to it. Especially you put > "linuxppc-dev@lists.ozlabs.org" in the TO list while Peter/Ingo > in the CC list -- that looks like a strong indication for powerpc. >=20 Thank you for your explanation, so how about modifying the title to: [PATCH v3 tip/locking/core 2/6] ... also works? BTW, does this bot have more tests than 0day? I have pushed this patchset to my own repo and had it tested by 0day. Regards, Boqun > [2015-10-12 22:27:49] patched_files: ["arch/powerpc/include/asm/cmpxchg.h= ", "lib/atomic64_test.c", "include/linux/atomic.h", "arch/powerpc/include/a= sm/atomic.h"] > [2015-10-12 22:27:49] bases: ["powerpc/next", "powerpc/next"] >=20 > [2015-10-12 22:27:49] lists: ["linux-kernel@vger.kernel.org", "linuxppc-d= ev@lists.ozlabs.org", "Peter Zijlstra ", "Ingo Molnar= " > , "Benjamin Herrenschmidt ", "Paul Mackerras ", "Michael Ellerman ", "Thomas Gleixne= r e>", "Will Deacon ", "\"Paul E. McKenney\" ", "Waiman Long ", "Davidlohr Bueso = " > , "Boqun Feng "] > [2015-10-12 22:27:49] bases: ["powerpc/next", "powerpc/next", "powerpc/ne= xt", "mpe/next", "mpe/next", "arm64/for-next/core", "arm64/for-next/core"] >=20 > The possible improvement would be to let tip:locking/core register > itself in the MAINTAINERS file to match files *cmpxchg* *atomic*. >=20 > Thanks, > Fengguang >=20 > On Mon, Oct 12, 2015 at 10:56:52PM +0800, Boqun Feng wrote: > > On Mon, Oct 12, 2015 at 10:43:56PM +0800, kbuild test robot wrote: > > > Hi Boqun, > > >=20 > > > [auto build test ERROR on v4.3-rc5 -- if it's inappropriate base, ple= ase suggest rules for selecting the more suitable base] > > >=20 > >=20 > > This patch should be tested based on current locking/core branch of tip > > tree. Thank you. > >=20 > > Regards, > > Boqun > >=20 > > > url: https://github.com/0day-ci/linux/commits/Boqun-Feng/atomics-p= owerpc-Implement-relaxed-acquire-release-variants-of-some-atomics/20151012-= 222750 > > > config: x86_64-randconfig-x016-10121751 (attached as .config) > > > reproduce: > > > # save the attached .config to linux build tree > > > make ARCH=3Dx86_64=20 > > >=20 > > > All error/warnings (new ones prefixed by >>): > > >=20 > > > In file included from include/linux/init.h:4:0, > > > from lib/atomic64_test.c:14: > > > lib/atomic64_test.c: In function 'test_atomic': > > > >> lib/atomic64_test.c:60:9: error: implicit declaration of function = 'atomic_inc_return_acquire' [-Werror=3Dimplicit-function-declaration] > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > include/linux/compiler.h:166:42: note: in definition of macro 'unl= ikely' > > > # define unlikely(x) __builtin_expect(!!(x), 0) > > > ^ > > > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON' > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > >> lib/atomic64_test.c:38:2: note: in expansion of macro 'TEST_ARGS' > > > test(bit, op##_acquire, ##args); \ > > > ^ > > > >> lib/atomic64_test.c:79:2: note: in expansion of macro 'FAMILY_TEST' > > > FAMILY_TEST(TEST_ARGS, bit, inc_return, \ > > > ^ > > > >> lib/atomic64_test.c:113:2: note: in expansion of macro 'INC_RETURN= _FAMILY_TEST' > > > INC_RETURN_FAMILY_TEST(, v0); > > > ^ > > > >> lib/atomic64_test.c:60:9: error: implicit declaration of function = 'atomic_inc_return_release' [-Werror=3Dimplicit-function-declaration] > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > include/linux/compiler.h:166:42: note: in definition of macro 'unl= ikely' > > > # define unlikely(x) __builtin_expect(!!(x), 0) > > > ^ > > > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON' > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_ARGS' > > > test(bit, op##_release, ##args); \ > > > ^ > > > >> lib/atomic64_test.c:79:2: note: in expansion of macro 'FAMILY_TEST' > > > FAMILY_TEST(TEST_ARGS, bit, inc_return, \ > > > ^ > > > >> lib/atomic64_test.c:113:2: note: in expansion of macro 'INC_RETURN= _FAMILY_TEST' > > > INC_RETURN_FAMILY_TEST(, v0); > > > ^ > > > >> lib/atomic64_test.c:60:9: error: implicit declaration of function = 'atomic_inc_return_relaxed' [-Werror=3Dimplicit-function-declaration] > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > include/linux/compiler.h:166:42: note: in definition of macro 'unl= ikely' > > > # define unlikely(x) __builtin_expect(!!(x), 0) > > > ^ > > > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON' > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_ARGS' > > > test(bit, op##_relaxed, ##args); \ > > > ^ > > > >> lib/atomic64_test.c:79:2: note: in expansion of macro 'FAMILY_TEST' > > > FAMILY_TEST(TEST_ARGS, bit, inc_return, \ > > > ^ > > > >> lib/atomic64_test.c:113:2: note: in expansion of macro 'INC_RETURN= _FAMILY_TEST' > > > INC_RETURN_FAMILY_TEST(, v0); > > > ^ > > > >> lib/atomic64_test.c:60:9: error: implicit declaration of function = 'atomic_dec_return_acquire' [-Werror=3Dimplicit-function-declaration] > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > include/linux/compiler.h:166:42: note: in definition of macro 'unl= ikely' > > > # define unlikely(x) __builtin_expect(!!(x), 0) > > > ^ > > > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON' > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > >> lib/atomic64_test.c:38:2: note: in expansion of macro 'TEST_ARGS' > > > test(bit, op##_acquire, ##args); \ > > > ^ > > > lib/atomic64_test.c:85:2: note: in expansion of macro 'FAMILY_TEST' > > > FAMILY_TEST(TEST_ARGS, bit, dec_return, \ > > > ^ > > > >> lib/atomic64_test.c:114:2: note: in expansion of macro 'DEC_RETURN= _FAMILY_TEST' > > > DEC_RETURN_FAMILY_TEST(, v0); > > > ^ > > > >> lib/atomic64_test.c:60:9: error: implicit declaration of function = 'atomic_dec_return_release' [-Werror=3Dimplicit-function-declaration] > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > include/linux/compiler.h:166:42: note: in definition of macro 'unl= ikely' > > > # define unlikely(x) __builtin_expect(!!(x), 0) > > > ^ > > > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON' > > > BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > ^ > > > lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_ARGS' > > > test(bit, op##_release, ##args); \ > > > ^ > > > lib/atomic64_test.c:85:2: note: in expansion of macro 'FAMILY_TEST' > > > FAMILY_TEST(TEST_ARGS, bit, dec_return, \ > > > ^ > > > >> lib/atomic64_test.c:114:2: note: in expansion of macro 'DEC_RETURN= _FAMILY_TEST' > > > DEC_RETURN_FAMILY_TEST(, v0); > > > ^ > > >=20 > > > vim +/atomic_inc_return_acquire +60 lib/atomic64_test.c > > >=20 > > > 8 * the Free Software Foundation; either version 2 of the Licen= se, or > > > 9 * (at your option) any later version. > > > 10 */ > > > 11=09 > > > 12 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > > 13=09 > > > > 14 #include > > > 15 #include > > > 16 #include > > > 17 #include > > > 18=09 > > > 19 #define TEST(bit, op, c_op, val) \ > > > 20 do { \ > > > 21 atomic##bit##_set(&v, v0); \ > > > 22 r =3D v0; \ > > > 23 atomic##bit##_##op(val, &v); \ > > > 24 r c_op val; \ > > > 25 WARN(atomic##bit##_read(&v) !=3D r, "%Lx !=3D %Lx\n", \ > > > 26 (unsigned long long)atomic##bit##_read(&v), \ > > > 27 (unsigned long long)r); \ > > > 28 } while (0) > > > 29=09 > > > 30 /* > > > 31 * Test for a atomic operation family, > > > 32 * @test should be a macro accepting parameters (bit, op, ...) > > > 33 */ > > > 34=09 > > > 35 #define FAMILY_TEST(test, bit, op, args...) \ > > > 36 do { \ > > > 37 test(bit, op, ##args); \ > > > > 38 test(bit, op##_acquire, ##args); \ > > > > 39 test(bit, op##_release, ##args); \ > > > > 40 test(bit, op##_relaxed, ##args); \ > > > 41 } while (0) > > > 42=09 > > > 43 #define TEST_RETURN(bit, op, c_op, val) \ > > > 44 do { \ > > > 45 atomic##bit##_set(&v, v0); \ > > > 46 r =3D v0; \ > > > 47 r c_op val; \ > > > 48 BUG_ON(atomic##bit##_##op(val, &v) !=3D r); \ > > > 49 BUG_ON(atomic##bit##_read(&v) !=3D r); \ > > > 50 } while (0) > > > 51=09 > > > 52 #define RETURN_FAMILY_TEST(bit, op, c_op, val) \ > > > 53 do { \ > > > 54 FAMILY_TEST(TEST_RETURN, bit, op, c_op, val); \ > > > 55 } while (0) > > > 56=09 > > > 57 #define TEST_ARGS(bit, op, init, ret, expect, args...) \ > > > 58 do { \ > > > 59 atomic##bit##_set(&v, init); \ > > > > 60 BUG_ON(atomic##bit##_##op(&v, ##args) !=3D ret); \ > > > 61 BUG_ON(atomic##bit##_read(&v) !=3D expect); \ > > > 62 } while (0) > > > 63=09 > > > 64 #define XCHG_FAMILY_TEST(bit, init, new) \ > > > 65 do { \ > > > 66 FAMILY_TEST(TEST_ARGS, bit, xchg, init, init, new, new); \ > > > 67 } while (0) > > > 68=09 > > > 69 #define CMPXCHG_FAMILY_TEST(bit, init, new, wrong) \ > > > 70 do { \ > > > 71 FAMILY_TEST(TEST_ARGS, bit, cmpxchg, \ > > > 72 init, init, new, init, new); \ > > > 73 FAMILY_TEST(TEST_ARGS, bit, cmpxchg, \ > > > 74 init, init, init, wrong, new); \ > > > 75 } while (0) > > > 76=09 > > > 77 #define INC_RETURN_FAMILY_TEST(bit, i) \ > > > 78 do { \ > > > > 79 FAMILY_TEST(TEST_ARGS, bit, inc_return, \ > > > 80 i, (i) + one, (i) + one); \ > > > 81 } while (0) > > > 82=09 > > > 83 #define DEC_RETURN_FAMILY_TEST(bit, i) \ > > > 84 do { \ > > > > 85 FAMILY_TEST(TEST_ARGS, bit, dec_return, \ > > > 86 i, (i) - one, (i) - one); \ > > > 87 } while (0) > > > 88=09 > > > 89 static __init void test_atomic(void) > > > 90 { > > > 91 int v0 =3D 0xaaa31337; > > > 92 int v1 =3D 0xdeadbeef; > > > 93 int onestwos =3D 0x11112222; > > > 94 int one =3D 1; > > > 95=09 > > > 96 atomic_t v; > > > 97 int r; > > > 98=09 > > > 99 TEST(, add, +=3D, onestwos); > > > 100 TEST(, add, +=3D, -one); > > > 101 TEST(, sub, -=3D, onestwos); > > > 102 TEST(, sub, -=3D, -one); > > > 103 TEST(, or, |=3D, v1); > > > 104 TEST(, and, &=3D, v1); > > > 105 TEST(, xor, ^=3D, v1); > > > 106 TEST(, andnot, &=3D ~, v1); > > > 107=09 > > > 108 RETURN_FAMILY_TEST(, add_return, +=3D, onestwos); > > > 109 RETURN_FAMILY_TEST(, add_return, +=3D, -one); > > > 110 RETURN_FAMILY_TEST(, sub_return, -=3D, onestwos); > > > 111 RETURN_FAMILY_TEST(, sub_return, -=3D, -one); > > > 112=09 > > > > 113 INC_RETURN_FAMILY_TEST(, v0); > > > > 114 DEC_RETURN_FAMILY_TEST(, v0); > > > 115=09 > > > 116 XCHG_FAMILY_TEST(, v0, v1); > > > 117 CMPXCHG_FAMILY_TEST(, v0, v1, onestwos); > > >=20 > > > --- > > > 0-DAY kernel test infrastructure Open Source Technolog= y Center > > > https://lists.01.org/pipermail/kbuild-all Intel Cor= poration > >=20 > >=20 >=20 >=20 --R3G7APHDIzY6R/pk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWG9TcAAoJEEl56MO1B/q4s/gIAI87n1//mF52t2+70rkt3QZA WCnIsWUTlJ5x2UH1ZJT8JTNEWnKJjPQzFfdN6Lhdat69IXxAmt173fWDGUpGYReI AxnXsrXshJ85lfDRDlE+3Sjosg6Pr7Wchw7F2YA0o5X6/hHoegm5jXmdg9CU0LgQ 5DnbA6at3SJXFnQEhPhbXAjhsEqkwHlhGQ2rsMG/AfYg5BexnTFO0aOqSn9qgpsy WI6cKZ5hWr1QsvBBP9DK2a3m5dTPwwdlFWqMgaM6Ta2gbi5XatDw6WNd8wTkzAX/ jnb5HmxbxT0j1ym6Vh8HEECEhPzbUD7bDy+vWWFPHOegmpdCkc/POsh4mCa+BnM= =4WaJ -----END PGP SIGNATURE----- --R3G7APHDIzY6R/pk--