Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754403AbeAKMxi (ORCPT + 1 other); Thu, 11 Jan 2018 07:53:38 -0500 Received: from mga07.intel.com ([134.134.136.100]:34655 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753909AbeAKMxh (ORCPT ); Thu, 11 Jan 2018 07:53:37 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,344,1511856000"; d="scan'208";a="9319960" Message-ID: <1515674763.7000.912.camel@linux.intel.com> Subject: Re: [PATCH v1 4/4] bitmap: Make bitmap_fill() and bitmap_zero() consistent From: Andy Shevchenko To: Yury Norov Cc: Andrew Morton , linux-kernel@vger.kernel.org, Rasmus Villemoes , Randy Dunlap , Arnaldo Carvalho de Melo Date: Thu, 11 Jan 2018 14:46:03 +0200 In-Reply-To: <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> <20180111115705.b2re4mzutl7mfsim@yury-thinkpad> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, 2018-01-11 at 14:57 +0300, Yury Norov wrote: > 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: > > > > 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, I don't know. There are like you said 51 user of the bitmap_fill(). If we lucky that developers are not so-o-o dumb to use bitmap_fill() as a replacement of bitmap_set(..., 0, ...), nothing will need to be fixed. > and there are at least 2 cases like that? Where this come from? > 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. It would be found much earlier in the core code, otherwise it's business as usual. > This is not acceptable scenario. If you have willing to take > responsibility, please do it now and don't wait when things go > broken. So, instead of beating the air you can help to check the places, right? > > > 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. It's not mechanical, that is the point. (Incorrect) usage of bitmap_fill() is a bug. Fix that helps to reveal it earlier is a good one. > > > 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. Yeah, notification is a good thing. > For me, > people simply forget about tools/* and that's why maintainers have to > sync sources periodically. Might be, my at least one patch (and few pings) to tools code at the end is left neither commented not applied for years, so, I gave up on them, sorry @acme et al. OTOH fixes for Makefiles are usually go in quickly. > Anyway, if you think that your change is good > enough for Linux kernel, why don't you think so for tools? I didn't tell that. -- Andy Shevchenko Intel Finland Oy