Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbdFBLfE (ORCPT ); Fri, 2 Jun 2017 07:35:04 -0400 Received: from mail-sn1nam01on0074.outbound.protection.outlook.com ([104.47.32.74]:29522 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751126AbdFBLe7 (ORCPT ); Fri, 2 Jun 2017 07:34:59 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=caviumnetworks.com; Date: Fri, 2 Jun 2017 14:34:43 +0300 From: Yury Norov To: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Ingo Molnar , Peter Zijlstra , Richard Henderson , Ivan Kokshaysky , Matt Turner , Geert Uytterhoeven Cc: Akinobu Mita , Mike Galbraith , Paul Bolle Subject: Re: [PATCH 0/6] {sched_,}find_first{_zero}_bit optimizations Message-ID: <20170602113443.6xa6dahtlwoaz2za@yury-thinkpad> References: <20170523184321.11452-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170523184321.11452-1-ynorov@caviumnetworks.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [176.59.46.63] X-ClientProxiedBy: HE1PR0802CA0019.eurprd08.prod.outlook.com (10.172.123.157) To BY1PR0701MB1272.namprd07.prod.outlook.com (10.160.108.18) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR0701MB1272: X-MS-Office365-Filtering-Correlation-Id: b53eb841-c76e-4025-831e-08d4a9ab6466 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BY1PR0701MB1272; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1272;3:UIhkucGDt3AjTKbR7aSRZtEiohBNWVzWRwHIhn0cksVgZSOMHl8U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6O//S5fVDGGd1DnJjSU/MYwMQ==;20:ec12S+CRr3bDH3uKV014MxBU4HmzOMr6bFFPLP1Imwujg36AE0qQsiOxEpsYrXsB97j+fXeOIBnLce4I59XIEI0wsMMpUnACIoY8v3CybmNyplyjogZgJHOSKqWPiAetoOJtRU0niFIPxMZmlwqH7enxWM79M2chFFDn9wfpoIvap1BwWAmTuB6PuJiyzylL4FrLjYK118Mnh8/pMQlB1WfkIjiyo51fwyx7jgaYwpjvWYNdCJaZis6xaPfXLgTcL4HNtrH/O1wcEN2Q9Y+xsZQGzed5ofv1gaKmLydLSAQipn8bRjrKugwmmB7k3w7c87vGbCsaL7VdwlM1/JbkYjVTaaQMAKMyG8hkHee5/CXeMQR/wWKl/bGs3fR366UU4GvIPRiKNPVjekAKfpgpfk/U+rZfWeP87tNT0yXomH7gPMO8+GIhzrvC0UIDkIKDdnY3nStyF8HKiuFJWPLBhIN7ZwzJI6lDD7KC/oa63qUBnCshuOXC5zCpZluhfnG8xcUmmXKkkOTBDCDbVxmcQWgR4aqHgGuJxhB77Y+0oex1CQPdYxikDNzZa0nGTrpkzIEj1AdGY/T+F9J3OoDeqwEscPCNOzoWnjOfTxbz24o= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(3002001)(100000703101)(100105400095)(10201501046)(6041248)(20161123558100)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY1PR0701MB1272;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY1PR0701MB1272; X-Microsoft-Exchange-Diagnostics: =?us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JMTsPZCfp/fo+UUHzOS6SvS?= =?us-ascii?Q?XpJGl2zJ7FVAQBadYXjXlCtdvtvQA9NTrOyJS1mTEIpkHXsLlLJTr3U6+dqN?= =?us-ascii?Q?JGz71sEV7TyK1MthghtsN/3j3sfsPd/fw59hgSjBOeBOIWVC1VDJ/77535O/?= =?us-ascii?Q?Erfkt9yhc9mlltsFkF0O0jHayp/pwXK+NpcvzUQ5s6hGsylb7nnmLZwB36j7?= =?us-ascii?Q?Bn7zAiPakUEoMLQK+OU8TLMGyUwj6D9MIc4cwiCBZ+nwk55bC28LxlW/qrib?= =?us-ascii?Q?xEp6UEIi1Bk=3D?= X-Forefront-PRVS: 03264AEA72 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(39400400002)(39450400003)(39410400002)(39850400002)(39840400002)(24454002)(6116002)(42882006)(66066001)(2950100002)(54906002)(50466002)(23726003)(1076002)(4326008)(83506001)(189998001)(478600001)(6666003)(9686003)(38730400002)(47776003)(229853002)(6486002)(81166006)(6306002)(33716001)(3846002)(8666007)(8676002)(6246003)(4001350100001)(966005)(33646002)(7416002)(5660300001)(53936002)(6496005)(76176999)(54356999)(42186005)(72206003)(7736002)(305945005)(25786009)(76506005)(2906002)(50986999);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1272;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1272;23:ZvQ9A8vGZ7aax83p5kdrxc9pPYu6k4nhExQaR47?= =?us-ascii?Q?F8MTuRDdGSlZR05jXszXReNI5bs2lDGT1LEGPw6ng6HHyNu34Y4xOM6aFCSV?= =?us-ascii?Q?Bk9hACGIRBrm7V5EDEt6QA0a2mVyGi/Oy3K4oRciKE+0mu1x/avcbcDrOe0H?= =?us-ascii?Q?fqjCqowZbtZ2jJuVprNGno29W3tUozA8PXBPi0RwJBvtwzZqbtf+BNDNQK9+?= =?us-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YyTEilQMuHaCnxiGeNd3yDQMEH1Y7ZOEZKIlRqljFfzzxpCtNCxPM5LHI6MX8RRhlBg3qibGRS31tYUFPXVpMBpABjSLdfM5lFYhzZBqxtRlwDkLj0LNuj78yfiMPyVZ14PbEgG7uMlm+Dl5/0tVVHpsmoB49EUoMJBpDGUbviY36A0BEp2Jc/3OQGteaGZShaDyJVp6rnpmSbhukaso9ohoi7YoZkhbfohHuZsIo1d1CM+g4KuRhtpjX90t45;24:UHaLzJHKHUYynlW3B0IiWcN+5E10hsdIe+ahDiorua9OrME/euoiCRcXudAG1lqZwSXvy1PPnoA+NC5T3/IGRMvyYI0W8RBNpthAirMdAm4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1272;7:HwCAsQBmVGUUAsOBJYkuH+P8VzEepYM/t6e9JsAufI9OJ+lKY3PCpq94I9RUx2qF+5u6fbXZ/7FHY+peUfmlOSG/i0GEf8ULF8DiznaDbpbaHvZ5F6S/kDddgIr4ABWt1sYauspAauBTb+KG31prr2L+MpMrFOAPaqQ8EaI8rVdMfvfQhdS3UmxCYX02eLtESv303hDzfbYHzqsJT140PD4WdRCH0vVpxB++HKVW/9hRU4dD5B/x1SfLI/Ha/dCQcEZWE1OCIrO2ATSbItrKdWwPH0I4N5YUNfoVIRBjIPRVQ1cKv33X/Oa854AIZKW/izWZG+uZTlOJE9hbV0lKJg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2017 11:34:54.8305 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1272 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3120 Lines: 69 Ping? On Tue, May 23, 2017 at 09:43:15PM +0300, Yury Norov wrote: > The series is the result of this discussion: https://lkml.org/lkml/2017/5/12/665 > plus this patch: https://lkml.org/lkml/2017/5/13/137 > (I'd like to have it together with others.) > > Patch 1 remove useless GENERIC_FIND_FIRST_BIT option. Patches 2 and 3 change > the order of macros definition and/or headers inclusion for frv and m86k, as > it's needed in patch 4. Patch 4 adds the optimization for find_first_bit() and > find_first_zero_bit(). Patches 5 and 6 consolidate the implementation of > sched_find_first_bit(), and make it local. > > According to previous discussion, I added Arnd's ack to patches 5 and 6. > https://lkml.org/lkml/2017/5/15/514 and suggested-by to patch 4. > Arnd, are you OK with it? > > Yury Norov (6): > arch: remove GENERIC_FIND_FIRST_BIT > m68k: make __ffs and ffz defined prior to including find.h > frv: make __ffs() visible for find.h > find_first{,_zero}_bit: unroll search cycle for small bitmaps > alpha: drop custom implementation for sched_find_first_bit() > sched: move sched_find_first_bit() from bitops.h to > kernel/sched/sched.h > > arch/alpha/include/asm/bitops.h | 18 ----- > arch/arc/Kconfig | 1 - > arch/arc/include/asm/bitops.h | 1 - > arch/arm/include/asm/bitops.h | 1 - > arch/arm64/include/asm/bitops.h | 1 - > arch/blackfin/include/asm/bitops.h | 1 - > arch/c6x/include/asm/bitops.h | 1 - > arch/cris/include/asm/bitops.h | 2 - > arch/frv/include/asm/bitops.h | 4 +- > arch/h8300/include/asm/bitops.h | 1 - > arch/hexagon/include/asm/bitops.h | 1 - > arch/ia64/include/asm/bitops.h | 2 - > arch/m32r/include/asm/bitops.h | 1 - > arch/m68k/include/asm/bitops.h | 162 ++++++++++++++++++------------------- > arch/metag/include/asm/bitops.h | 1 - > arch/mips/include/asm/bitops.h | 2 - > arch/mn10300/include/asm/bitops.h | 1 - > arch/openrisc/include/asm/bitops.h | 1 - > arch/parisc/include/asm/bitops.h | 1 - > arch/powerpc/include/asm/bitops.h | 2 - > arch/s390/Kconfig | 1 - > arch/s390/include/asm/bitops.h | 1 - > arch/sh/include/asm/bitops.h | 1 - > arch/sparc/include/asm/bitops_32.h | 1 - > arch/sparc/include/asm/bitops_64.h | 1 - > arch/tile/Kconfig | 1 - > arch/tile/include/asm/bitops.h | 1 - > arch/unicore32/Kconfig | 1 - > arch/x86/Kconfig | 1 - > arch/x86/include/asm/bitops.h | 2 - > arch/x86/um/Kconfig | 1 - > arch/xtensa/include/asm/bitops.h | 1 - > include/asm-generic/bitops.h | 1 - > include/asm-generic/bitops/find.h | 82 +++++++++++++++++-- > include/asm-generic/bitops/sched.h | 31 ------- > kernel/sched/sched.h | 23 ++++++ > lib/Kconfig | 3 - > lib/find_bit.c | 8 +- > 38 files changed, 182 insertions(+), 184 deletions(-) > delete mode 100644 include/asm-generic/bitops/sched.h > > -- > 2.11.0