Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932337AbeAKL5V (ORCPT + 1 other); Thu, 11 Jan 2018 06:57:21 -0500 Received: from mail-cys01nam02on0052.outbound.protection.outlook.com ([104.47.37.52]:6856 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932067AbeAKL5T (ORCPT ); Thu, 11 Jan 2018 06:57:19 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Date: Thu, 11 Jan 2018 14:57:05 +0300 From: Yury Norov To: Andy Shevchenko Cc: Andrew Morton , linux-kernel@vger.kernel.org, Rasmus Villemoes , Randy Dunlap , Arnaldo Carvalho de Melo Subject: Re: [PATCH v1 4/4] bitmap: Make bitmap_fill() and bitmap_zero() consistent Message-ID: <20180111115705.b2re4mzutl7mfsim@yury-thinkpad> References: <20180109172430.87452-1-andriy.shevchenko@linux.intel.com> <20180109172430.87452-4-andriy.shevchenko@linux.intel.com> <20180110084938.ggb3x4pq5suprnne@yury-thinkpad> <1515590223.7000.853.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515590223.7000.853.camel@linux.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [42.107.81.91] X-ClientProxiedBy: DB3PR0202CA0029.eurprd02.prod.outlook.com (2603:10a6:8:1::42) To DM5PR0701MB3830.namprd07.prod.outlook.com (2603:10b6:4:7f::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88cc5768-34e3-4d9b-1fdd-08d558ea769a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DM5PR0701MB3830; X-Microsoft-Exchange-Diagnostics: 1;DM5PR0701MB3830;3:0aVrRtMcIn9ZM0w8zglSdAI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mfWUiKsTPyQ7Et/0c1FVGes49KXCH7i5RjWCOOc1NbxOtRoVtQizJ3ZqLvU7c4qmMdE/7e0RXu3Y7BMWrCrt4ZW2846T/fljAwvqFsmCK/1oTe5HLIOjY4NdpGKnAzfjoei51uYQQnpObRn8PE9tPYtlrfJ/M3HzZc62gpxxPCUloG11CHd/bVyTrP+8Kwdt7aRWmnKzfOlH1Ta9usJOex1JedN4+w46P8xaXY6mRec1bpgS8tf4fguby6580K2nzjWHA8C8OGTrQewjTm8FwBZG/u1ikCeNDw1C3h3znXqINDaw9Jh1TaRsU2zYrQD82uc9anbczzeh2HGZB3eu1NwKGLRCPYTY8YwFNQD/cb4LoSaUDqiyZOLWFGeyM9HQNZ1pkIbrgejVYrdCrk50NwtR7VBnnJNjo4T9aM3vNihOfP1eoKiU=;4:GfR1AksG3mEZCX8JzXNO5Rq8LCs5SOBg3YmGyqg1JRzwdVKKOxkIW9W4veNuPheRuLt7giaLZjETTNFM+oZNpWFUmajp7xr1n+igvfGWxNwgwGcw/z5wQC4HWF9Z9V/s4J3L/aT4Y12LdVilz5ck8Ml/GWjLNZGIf+EMA+GOwSiEJfmf0e09USJtQ8DG63TfCLjKIbwWs/RnpMx+BBGrrV5RhaCBPe+HQkRWpuIIp/LML5/xKbE9RUQO6m1ggGLga1kZr/EfXh0x1tHRdHMNFQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(944501134)(93006095)(10201501046)(3002001)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR0701MB3830;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DM5PR0701MB3830; X-Forefront-PRVS: 0549E6FD50 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(7916004)(39850400004)(346002)(376002)(396003)(366004)(39380400002)(24454002)(377424004)(199004)(189003)(52314003)(2906002)(66066001)(50466002)(5009440100003)(105586002)(47776003)(316002)(106356001)(93886005)(5660300001)(76506005)(16586007)(42882006)(6916009)(16526018)(58126008)(6666003)(83506002)(54906003)(2950100002)(386003)(76176011)(305945005)(33716001)(229853002)(81166006)(25786009)(72206003)(4326008)(68736007)(97736004)(1076002)(3846002)(9686003)(23726003)(33896004)(8676002)(53936002)(6246003)(52116002)(6496006)(478600001)(6486002)(6116002)(81156014)(8936002)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR0701MB3830;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR0701MB3830;23:sRZQ282R6swbDk6ooGLMu46acNVCKEkFRZjHwtz?= =?us-ascii?Q?4nASE5+Zg/BUN2JclEsccKOs5vPgIOUETxrZzTBvIXVzPS0Bn+ngUM3wzceG?= =?us-ascii?Q?Nyj/gOQBvf+ckk2zqv2VkjTeFDGQyHJ6AM5sv2VPQY07D/DXPJpyzK9fPkKi?= =?us-ascii?Q?G0bLII4cqaLda895ao1NaHMv+Cb6hboULpXIIiy1nI/ym0+xRmjEAYHAX9T/?= =?us-ascii?Q?lMYaluYpLJiWeKgh27ErDW+5d9U5zHT92Ci3Lpb/3ra4VtCN+zVVWJjej4vs?= =?us-ascii?Q?gFENDOowQ0Gja2S4PKCTEb2Vbn3U7InQUFKVk6futKY+HioomY4s4my6jgYf?= =?us-ascii?Q?78qDxARjLyo2o8L5PVgho6Jy7FcSfzTtYVWtz73dnRGb/7g+ncMHrBSnS8Gl?= =?us-ascii?Q?Qt5TF2zz0p4ewI7aLux9lwI6NB65Sae8ZNbuxm6SatbyPwvcORABHvCbKfIt?= =?us-ascii?Q?23VOXcQ0nWAKj9/uamwDg7a7FOdHPlqvmQY9NVgfmcHxYxZj+2CRrWK4Fkh4?= =?us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?= X-Microsoft-Exchange-Diagnostics: 1;DM5PR0701MB3830;6:BlCRrD4EB3nsIC8guNDKILmSSJFIyo7cPIFj5e4nRFylRvOrdRpBQcNUV955DG6mQrP42FoFlhxSbEdUKC9u6KegMiXvZuLrNym0c1AernycqPFkemPD/rxxaLLQsjVZOw5fOURxYzVvllhc9DIlBaM0zr3GFIWE83iSDlvU3350k11ZSj2WCcLH3VkxDRBCCGhY6uet1eQJXQcK49039KyPzpzASSHyoUSFoDUnZ2pg2gfHwEOcaiugN1FFpf2SLJGnGS1SeTbioYXqwWvb1jlm9SAGMxZP4u7Zk4SdqvVJ0BphVVcccH8csuzWulY3Q/QpUtz++JISyTL0mPHhVfCOnTwMORUiSS0X6z7KwhM=;5:Ji2X2kQdkzpFGGkGxG0Cb0Fx/NROU55LxerDMb54nfYNZqdHn4Ecda3b35Gz/zqRSBBZOpuF4emReuyEND1n/Y4aI0cwHMWA1is2mTcTNPOJYaQs2unWiuDdpGNfjr3Eq5gGFMBGwdLdcpn3jFN09dMQXUzUgSxT1iMxkzsYvL8=;24:5oDSpSAZFc+Figu6NJBhVdoVMt+qe6vlabYlvq9hBL7bUseMawwW0IqXxpNIxPqmkklTXidl2Ni+Y6sxPIoSuP2dfa/GMz2HXW8GgbXm5no=;7:CLhDBtGHUktmC68l2BfOn6bleAedEW/o1RrWsBiItAxuSfRyj1mtWfCUVvI5mOVJJ+A7bpHdJZATqxk7jQcSTEdfRBDTQ8YP0IXsCpHJMmazU9P/C8Wl0vNGJQFkoDiK42v1LxRVmapRGtRoCtvd/KqWh0P0sZahzdh6pKbmzi+qMhtl3rJxx8A3Fbk8Gnqt0kLGxwTucWRCx4+YoJYOBwTMq7n4xhMTnjYmsj5WDeHB54pywrpHV8dXrB3vpxcc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2018 11:57:16.9290 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88cc5768-34e3-4d9b-1fdd-08d558ea769a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0701MB3830 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 10, 2018 at 03:17:03PM +0200, Andy Shevchenko wrote: > On Wed, 2018-01-10 at 11:49 +0300, Yury Norov wrote: > > On Tue, Jan 09, 2018 at 07:24:30PM +0200, Andy Shevchenko wrote: > > > Behaviour of bitmap_fill() differs from bitmap_zero() in a way > > > how bits behind bitmap are handed. bitmap_zero() clears entire > > > bitmap > > > by unsigned long boundary, while bitmap_fill() mimics bitmap_set(). > > > > > > Here we change bitmap_fill() behaviour to be consistent with > > > bitmap_zero() > > > and add a note to documentation. > > > > > > The change might reveal some bugs in the code where unused bits > > > handled > > > differently and in such cases bitmap_set() has to be used. > > > > There is only 51 users of bitmap_fill() in the kernel, including > > tests. If you propose this change, I think you'd check them all > > manually. > > Some of them might require 5 minutes to check while others (especially > in the areas I don't know much about) 5+ hours. I rely on Rasmus > assumption that there _were_ bugs, though they assumed to be fixed by > now. > > In any case I'm ready to take responsibility of possible breakage and > fully into provide fixes by demand. Is my understanding correct that you need almost a working day to decide what function to use - bitmap_set() or bitmap_fill() in some cases, and there are at least 2 cases like that? If so, there's quite realistic chance that bug will hit us 6 month after upstreaming the patch when affected kernel will be delivered to end users by distro developers. This is not acceptable scenario. If you have willing to take responsibility, please do it now and don't wait when things go broken. > > Sorry that. > > I lost your thought here. What did you mean by this? I only mean that I realize that I ask you to do big amount of boring mechanical work, and I'm not happy with that. > > Also, there's tools/include/linux/bitmap.h which has a copy of > > bitmap_fill(), and should be consistent with main kernel sources. > > tools is independent, although quite related, project to the kernel > itself. They will decide by themselves how to proceed, I suppose. > > At least what I see in the history of changes in the tools/ they usually > follow the changes in main library after while. [CC Arnaldo Carvalho de Melo ] You can always ask tools/* maintainers what is better for them. For me, people simply forget about tools/* and that's why maintainers have to sync sources periodically. Anyway, if you think that your change is good enough for Linux kernel, why don't you think so for tools? Yury