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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6A45C433E0 for ; Sat, 9 Jan 2021 01:04:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9648E23A75 for ; Sat, 9 Jan 2021 01:04:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbhAIBE0 (ORCPT ); Fri, 8 Jan 2021 20:04:26 -0500 Received: from casper.infradead.org ([90.155.50.34]:59684 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbhAIBEZ (ORCPT ); Fri, 8 Jan 2021 20:04:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=T8SDUdzx1DLheCzLoyrLEGQyCwv1obD1Uy5JaUB9koY=; b=ove/+5YPf0ph6VbbaIh8SgBgZ/ wTZMNLJKHfcsw5nbz1aGCH26z+191Xwrf0ZjWda9sJ33DfnlHK/Su30766+YuvNgNji35EZeKzK+Q 5hnDf1loYj6GuHI80JD+RzQPQX2BdbwSqG0p/mopEKQ6GPdC5EOm0zdgTGHFCbvknqz3diVPuUYX7 Py/UsgnwHw/zoNAfRciyLJtuzy0dUpHMb5qz9emRxNsjdmbxC1+42/cEyjj6VR/xwnoCa/L00aGri uPOsX2LfGEXBuEkreG7RxW9QpMYS/gOmzYAzkPOMK28soX2rW+YnYjIxe7dr8gV3avPmZJxZYntw8 PDNo2ELg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1kxW7m-00070I-Cg; Thu, 07 Jan 2021 14:19:07 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 72BAA3003E5; Thu, 7 Jan 2021 15:18:47 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5D50D2B88A082; Thu, 7 Jan 2021 15:18:47 +0100 (CET) Date: Thu, 7 Jan 2021 15:18:47 +0100 From: Peter Zijlstra To: Yury Norov Cc: paulmck@kernel.org, Linux Kernel Mailing List , kernel-team@fb.com, Paul Gortmaker Subject: Re: [PATCH RFC cpumask 4/5] cpumask: Add "last" alias for cpu list specifications Message-ID: References: <20210106004850.GA11682@paulmck-ThinkPad-P72> <20210106004956.11961-4-paulmck@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 06, 2021 at 01:16:50PM -0800, Yury Norov wrote: > On Wed, Jan 6, 2021 at 1:50 AM Peter Zijlstra wrote: > > Aside from the comments Yury made, on how all this is better in > > bitmap_parselist(), how about doing s/last/N/ here? For me something > > like: "4-N" reads much saner than "4-last". > > > > Also, it might make sense to teach all this about core/node topology, > > but that's going to be messy. Imagine something like "Core1-CoreN" or > > "Nore1-NodeN" to mean the mask all/{Core,Node}0. > > If you just want to teach bitmap_parselist() to "s/Core0/0-4", I think > it's doable if we add a hook to a proper subsystem in bitmap_parselist(). > > > And that is another feature that seems to be missing from parselist, > > all/except. > > We already support groups in a range. I think it partially covers the > proposed all/except. > > Can you share examples on what you miss? The obvious one is the "all/Core0" example above, which would be equivalent to "Core1-CoreN". Another case that I don't think we can do today is something like, give me SMT0 of each core. I don't really see the use of the ranges thing, CPU enumeration just isn't sane like that. Also, I should really add that randomization pass to the CPU enumeration :-)