Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2330775rwp; Fri, 14 Jul 2023 04:43:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlERMAobyi9b8CX62D4sL+UxXO8sXDhsLrQI6obcKrAhK6/njl/Pvena2vzi9A1uinaihmLJ X-Received: by 2002:a17:90b:38c7:b0:263:7d57:16e9 with SMTP id nn7-20020a17090b38c700b002637d5716e9mr3922559pjb.21.1689334999933; Fri, 14 Jul 2023 04:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689334999; cv=none; d=google.com; s=arc-20160816; b=w96MxBAXI9Gyc/TI+LNfo5f81LfNqg1hpBMYjOvy6ckRE/HeweXp4rGd+xuSrozZtc hblxngTUdyXh9MI0DX96gP7JhODfbUx4OFizefcOAXTDjJ9bLvRDrmddv5wQGGahJtQ7 aNAqJv0Vg+wEry6kldIpKDvRL2V/vqQ1vaeFlxHPc/Q8yVWRS8qTbq+qLcQKRgasD5Jt 7F5kdUP460PHo0tOXolKFol9o+dBuVvM2yK9rs0G7UVSa79pcUsDwhlUujwwGVRwOMKF raOTxhdUr8QthAV0BVYjteojAujg9vBymivtIX15oz2URdRgtWyyJFG60J7VXys2vEGJ BjNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AaMIGOn754L+miMuZojmjrtKoTJuPne9jWrzI7M6ZbM=; fh=b95atPg5J6yJ4yprt5y6bdXUO+7Tkv/nRTtPvZoNJdM=; b=pydGi26Z0Est0OKDY5rI89pC9I252Jo23Z1SuzhxXKT50G9xMZkVkM9AYrmYi01B8t 29/J56oK2KH5c6Bj9RPpMfpAigfhB0wu5djlzPGWcJeSW53Fv5M7WuItHUu0yH3Dpju6 /K7HwVsAxSSt7tryr1JqelQ7SnFHti13bmMrd/+U73hJ3Rn28XZd1KzhRnw5mbxbX/yp IkdTuQ+Q73vYdy2UMji3Qm65HSVLahUJUPp/66d8gcBsOeV6mcM6hs/Uvjyfq15qDesK d027233sWz3cSZKe/bKqrFVH0h9UxMKJp5ejgiABj09HftTiEEkJ+PjiGVI7IJeC26jT 8hUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dTziB8Hs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v9-20020a17090a4ec900b0026404467b7dsi1141932pjl.110.2023.07.14.04.43.07; Fri, 14 Jul 2023 04:43:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dTziB8Hs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235091AbjGNL2O (ORCPT + 99 others); Fri, 14 Jul 2023 07:28:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234317AbjGNL2M (ORCPT ); Fri, 14 Jul 2023 07:28:12 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E29542D79 for ; Fri, 14 Jul 2023 04:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689334091; x=1720870091; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=V4OAA33crh9kzRQhEws5le5Gfe8QPCdN1/Z5VE8YyEM=; b=dTziB8Hs8DLswp2X14A17/ySzySoSWvNotMSGP/Vdk6x2HkO/GscR1xT qq+1kXY3Ua/1enXNvmumoxXg/7KSpDsK9r091FJ1Aoy1Y3S1Fkh434n2U 6gcKe3aBnW7f5NbLf1oBYxAMrcvMHobv7exRQH3HnhrYgqeiMuKSosQky 1y7hn+gAOY3dftemcIj+Z/qtrxYkUjcmJuW24GsDKCnXgVkrS0h98uMQs in8QEQvxA2oWoKgSVehRl6C8b1p5NlHI76lXTOOjOGl2QIpG4tupMpVjU /ar6vM3LSENkQYGtVmnOQBRU7GahPHpeYHg+TX+hoUW0jtASi2sDyake1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="365489855" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="365489855" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 04:28:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="787821820" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="787821820" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008.fm.intel.com with ESMTP; 14 Jul 2023 04:28:08 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qKGxy-002e4J-2C; Fri, 14 Jul 2023 14:28:06 +0300 Date: Fri, 14 Jul 2023 14:28:06 +0300 From: Andy Shevchenko To: William Breathitt Gray Cc: Alexander Potapenko , catalin.marinas@arm.com, will@kernel.org, pcc@google.com, andreyknvl@gmail.com, linux@rasmusvillemoes.dk, yury.norov@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, eugenis@google.com Subject: Re: [v2 1/5] lib/bitmap: add bitmap_{set,get}_value_unaligned() Message-ID: References: <20230713125706.2884502-1-glider@google.com> <20230713125706.2884502-2-glider@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 14, 2023 at 07:19:15AM -0400, William Breathitt Gray wrote: > On Fri, Jul 14, 2023 at 11:04:16AM +0300, Andy Shevchenko wrote: > > On Thu, Jul 13, 2023 at 08:05:34PM +0200, Alexander Potapenko wrote: > > > On Thu, Jul 13, 2023 at 7:29 PM Andy Shevchenko > > > wrote: > > > > On Thu, Jul 13, 2023 at 02:57:01PM +0200, Alexander Potapenko wrote: > > > > > The two new functions allow setting/getting values of length up to > > > > > BITS_PER_LONG bits at arbitrary position in the bitmap. > > > > > > > > A couple of years (?) ago it was a series to achieve something like this with > > > > better (?) code. Why not resurrect that one? > > > > > > > > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2195426.html > > > > > > It looks more compact thanks to GENMASK, I can cook something based on > > > the proposed bitmap_{set,get}_value (and change the names if you > > > prefer the shorter ones). > > > But I'd better avoid pulling in the rest of that series without a strong need. > > > > William, what do you think on this? > > > > I'm personally prefer William's version as not only it was published first > > it was carefully designed and got a lot of review already. We just hadn't had > > the user for it that time. > > Yes, that version went through several revisions so it's been well > tested and known to work -- as you pointed out it just lacked the users > to warrant merging it into the tree. If it statisfies the use-case > required here now, then I think we should it pick it up rather than > reinvent the solution again. > > Also, we probably don't need the "clump" code in there, so perhaps > splitting it out to just the bitmap_{set,get}_value relevant code is > fine. Agree, thank you for your comments! -- With Best Regards, Andy Shevchenko