From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CB1AC3F6B0 for ; Wed, 17 Aug 2022 10:09:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238838AbiHQKJb (ORCPT ); Wed, 17 Aug 2022 06:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbiHQKJ3 (ORCPT ); Wed, 17 Aug 2022 06:09:29 -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 68A6E4A102 for ; Wed, 17 Aug 2022 03:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660730967; 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=rFQ2vbdqNLS83JEBag1JaG73C2ejg94L1xY/86td28w=; b=PrEaIf33xzkRRa3lxPK89SEwj8Cb2hqpVVcbWuGPzd6hNXxgj7NU84CY6jaipvmQRmGnCB loxxGCDEviHZNFPD8htvb6nF5BdzuI6VxKvBj5T9kVMDzLLGeuN8LxOAJTKaNu8MKigFsv sId3WJqdRIrXxZFL6eNyk389SbWWKXk= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-651-6VzFLTe0PrazZ1MuTSIJ-g-1; Wed, 17 Aug 2022 06:09:26 -0400 X-MC-Unique: 6VzFLTe0PrazZ1MuTSIJ-g-1 Received: by mail-wm1-f72.google.com with SMTP id r10-20020a1c440a000000b003a538a648a9so6137428wma.5 for ; Wed, 17 Aug 2022 03:09:26 -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=rFQ2vbdqNLS83JEBag1JaG73C2ejg94L1xY/86td28w=; b=UnQ+8LW3sg5SWlUwx3MozaMrZ4X2u9xIFf6pfUoCV7VurXNgj5qaOQwNxT0fdrYy+i nuzBr/SWb5pSGqMxMPU/dyVmAu7hb1modrIqVcHdm6oS2u7gpp+Qp+wMIlxZmTyu5qSb gBuPl9qM5Y+QfhQH0TqslPKj5+JFiQrV6Vmp3GzJQ7Gwd0zMFJPmjQxR2qdGtjYQwilR VvPDlsaUDl0FLil9jrHoBWswGGsD+pCU4JsXKwdOQrgwJYrWigFHvi+4St5/lKx6LvbR ZDQKNRoUjqgKNbX/VawZdgMo2IKnjwdgHxCXE3ihiZvPniOgfhbI08oW9Vdw8OyVTHKf L65g== X-Gm-Message-State: ACgBeo2CLnWSbVP3b4LKSh/lja2h23GGhP3UTzLxzPk7Uc5FGd9MCrRi YY5M/GQz8+2H8LAyj5MMDeqwUPHab7iqc5/pze+kG9NmfKRrWj3fKQ9tuX75bLcQJJFsTNE+5ax PboHfvONlEipmohqju9aMsdqq X-Received: by 2002:a5d:68c2:0:b0:225:1fd1:4225 with SMTP id p2-20020a5d68c2000000b002251fd14225mr2720005wrw.392.1660730965377; Wed, 17 Aug 2022 03:09:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ZGYQ0AEgur9hwTQYlVHMNZtnDKsqXY7sZjx66IWnuzJqZHhHrrJ4f4Wg4sIvLI1TqI9vYKw== X-Received: by 2002:a5d:68c2:0:b0:225:1fd1:4225 with SMTP id p2-20020a5d68c2000000b002251fd14225mr2719982wrw.392.1660730965093; Wed, 17 Aug 2022 03:09:25 -0700 (PDT) Received: from vschneid.remote.csb ([185.11.37.247]) by smtp.gmail.com with ESMTPSA id b18-20020a5d4b92000000b0021d6924b777sm12153974wrt.115.2022.08.17.03.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 03:09:24 -0700 (PDT) From: Valentin Schneider To: Yury Norov Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andy Shevchenko , Rasmus Villemoes , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Mel Gorman , Greg Kroah-Hartman , Barry Song , Heiko Carstens , Tony Luck , Jonathan Cameron , Gal Pressman , Tariq Toukan Subject: Re: [PATCH 2/5] cpumask: Introduce for_each_cpu_andnot() In-Reply-To: References: <20220816180727.387807-1-vschneid@redhat.com> <20220816180727.387807-3-vschneid@redhat.com> Date: Wed, 17 Aug 2022 11:09:23 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/08/22 15:24, Yury Norov wrote: > On Tue, Aug 16, 2022 at 07:07:24PM +0100, Valentin Schneider wrote: >> for_each_cpu_and() is very convenient as it saves having to allocate a >> temporary cpumask to store the result of cpumask_and(). The same issue >> applies to cpumask_andnot() which doesn't actually need temporary storage >> for iteration purposes. >> >> Following what has been done for for_each_cpu_and(), introduce >> for_each_cpu_andnot(). >> >> Signed-off-by: Valentin Schneider >> --- >> include/linux/cpumask.h | 32 ++++++++++++++++++++++++++++++++ >> lib/cpumask.c | 19 +++++++++++++++++++ >> 2 files changed, 51 insertions(+) >> >> diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h >> index fe29ac7cc469..a8b2ca160e57 100644 >> --- a/include/linux/cpumask.h >> +++ b/include/linux/cpumask.h >> @@ -157,6 +157,13 @@ static inline unsigned int cpumask_next_and(int n, >> return n+1; >> } >> >> +static inline unsigned int cpumask_next_andnot(int n, >> + const struct cpumask *srcp, >> + const struct cpumask *andp) >> +{ >> + return n+1; >> +} >> + > > It looks like the patch is not based on top of 6.0, where UP cpumask > operations were fixed. Can you please rebase? > Right, this is based on tip/sched/core, I'll rebase it. Sorry about that!