Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1449281rwb; Fri, 19 Aug 2022 04:03:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR4FQFRq5MZ7w03FaNFCQQyCLkewJhXaPneB6iJcyxarlhd4RdMTlcV+mitbxV62iHe1PO7Q X-Received: by 2002:a17:907:1dcb:b0:73d:34f7:d39c with SMTP id og11-20020a1709071dcb00b0073d34f7d39cmr1213074ejc.600.1660907035884; Fri, 19 Aug 2022 04:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660907035; cv=none; d=google.com; s=arc-20160816; b=CulqYwsfWGuyNiaEPgGTlqj5u/HjA53GTGCLXci0Jd53G8DPbodggArTeOgwUjKcR8 g0wkIcjoExUMHe1PS0Qg80cOlQqzlwT8hvnJ7a/KjPwCjZYQaS0MuiAyFpX7FRbt3zdG IrgMeJrtYZPEDMRF8LUfhSACwYvyqwu3tGUOVXlFJExcqtjfd84DpCdwztQffIdINLaX VhuVlzBUEZbPqeBn5FE6CFDi2XUICHqBHUMDwY9bTdiKbxNrl9vPCNS+ctHymMr6lI+u cErpUkjED/cufi8u+6gpOM7HgMKPI9kAeb8bEZTNi1/4NYgAP+l8/mOhiPzUduMgmcN7 M7Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=t9qConcsVrFeMSKZiZOZ7jvIr/WxjYXLhBQh/vLaFNc=; b=FZzHeGT/KbnmQVq2Ilh7HIgZ8uB/r1I957ORDCb3ooJMhGVVd89xOIUkVSpRM7oMhH ROPKppB5fux1nORyVRKNpPUVskHqwpmHkP0p/LogfGp1fGCgEN6A/UYMT+625WDay3cG zR8ILt4NZjNs2HySpDT9DW2EloCtwIzFbZ472nqjFhqB92EZyDiWttr8eig6C/dMK4Zd 5W7QcyMLd/Zyj+LEZzTqOz6Q4R0x6Y/zdy/dZFqT2oSr387GRh8+BDVC/DSjUWCSfBmt jeRy0OiZ61nulr3no9TfGhoNVNNKiuIH+gfspuFaKjn3xq7LEmZvEWpj9O6GBBzmkwz9 3tsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aV6M06N4; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb2-20020a170907960200b00732fd99cdb5si3479048ejc.854.2022.08.19.04.03.29; Fri, 19 Aug 2022 04:03:55 -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=@redhat.com header.s=mimecast20190719 header.b=aV6M06N4; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347413AbiHSKeR (ORCPT + 99 others); Fri, 19 Aug 2022 06:34:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348029AbiHSKeJ (ORCPT ); Fri, 19 Aug 2022 06:34:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ECB03DF2A for ; Fri, 19 Aug 2022 03:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660905246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t9qConcsVrFeMSKZiZOZ7jvIr/WxjYXLhBQh/vLaFNc=; b=aV6M06N4NgBlzmkUp4MMxNRa0koCQ4xdcPTbMhczatmB15nDwq6rEdyu79R530s2grjbHw EhxFMFCcpdDe/d5puVDl2W5uhSr0NheUvNeYzl8qcG7IJAxgqEG8Fj75WXfVYMFYyzyFDs GkXTWHJjP1QyWBlcCSYY9qs6G4oI3TQ= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-111-gw1IjTYaMiOC1HI27ccfFw-1; Fri, 19 Aug 2022 06:34:04 -0400 X-MC-Unique: gw1IjTYaMiOC1HI27ccfFw-1 Received: by mail-wr1-f70.google.com with SMTP id o13-20020adfba0d000000b0022524f3f4faso641173wrg.6 for ; Fri, 19 Aug 2022 03:34:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=t9qConcsVrFeMSKZiZOZ7jvIr/WxjYXLhBQh/vLaFNc=; b=f1R2Gw63r6OhH3RA0JUs+KdQYlMwMMvpCmrIZ/Lg1AuioDfVpSE5r7D2n3UFRn/9zQ lRiJ60zLLBAtngMwa3oIssF68Cu/wUM4WjHCqZ49Rp+XWmFeuUcnTuaEp0DyZzPFVujo RppNFbuT0tyyFf6U90Q586/3MjktPqehqsaWggcMdxrKiM1WakwbxxBJAtSzvoUKlPTW Y073QiWWpCqgAgiVPX+F6sqONTRpM1YbeMJpzgRh4jxWGuusRQWZToXRv3oYs3+Jt632 oxcihg+BiKykkGkwD5XSrbuzs0QKJskDyKbp7+OOOwNTl0D1Wsy9kR2wtJTqkxqeGb/L I9nQ== X-Gm-Message-State: ACgBeo3u0M3eyBdwi5cjJnS/26tD723oSu4X5p4QpnHWi9RLYP+q5ve8 e+W5JThJ0GV7scxzpFry+cXhxo1k318ojuzQhDwBCsI89aXinn6n/3GPUvjfF47jgaWXilqtWf7 ORCS3A7NamE1oGgrX0jZqmC7W X-Received: by 2002:a5d:64e9:0:b0:220:7dd7:63eb with SMTP id g9-20020a5d64e9000000b002207dd763ebmr3831675wri.590.1660905243397; Fri, 19 Aug 2022 03:34:03 -0700 (PDT) X-Received: by 2002:a5d:64e9:0:b0:220:7dd7:63eb with SMTP id g9-20020a5d64e9000000b002207dd763ebmr3831663wri.590.1660905243244; Fri, 19 Aug 2022 03:34:03 -0700 (PDT) Received: from vschneid.remote.csb ([185.11.37.247]) by smtp.gmail.com with ESMTPSA id b18-20020adff252000000b00224f605f39dsm3501436wrp.76.2022.08.19.03.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 03:34:02 -0700 (PDT) From: Valentin Schneider To: Andy Shevchenko , Steven Rostedt Cc: netdev , "open list:HFI1 DRIVER" , Linux Kernel Mailing List , Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yury Norov , Andy Shevchenko , Rasmus Villemoes , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Mel Gorman , Greg Kroah-Hartman , Barry Song , Heiko Carstens , Tony Luck , Jonathan Cameron , Gal Pressman , Tariq Toukan Subject: Re: [PATCH v2 1/5] bitops: Introduce find_next_andnot_bit() In-Reply-To: References: <20220817175812.671843-1-vschneid@redhat.com> <20220817175812.671843-2-vschneid@redhat.com> <20220818100820.3b45808b@gandalf.local.home> <20220818130041.5b7c955f@gandalf.local.home> Date: Fri, 19 Aug 2022 11:34:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 18/08/22 22:04, Andy Shevchenko wrote: > On Thu, Aug 18, 2022 at 8:18 PM Steven Rostedt wrote: >> On Thu, 18 Aug 2022 17:26:43 +0100 >> Valentin Schneider wrote: >> >> > How about: >> >> > >> > find the next set bit in (*addr1 & ~*addr2) >> >> I understand the above better. But to convert that into English, we could >> say: >> >> >> Find the next bit in *addr1 excluding all the bits in *addr2. >> >> or >> >> Find the next bit in *addr1 that is not set in *addr2. > > With this explanation I'm wondering how different this is to > bitmap_bitremap(), with adjusting to using an inverted mask. If they > have something in common, perhaps make them in the same namespace with > similar naming convention? > I'm trying to wrap my head around the whole remap thing, IIUC we could have something like remap *addr1 to ~*addr2 and stop rather than continue with a wraparound, but that really feels like shoehorning. > -- > With Best Regards, > Andy Shevchenko