Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp723585pxb; Fri, 8 Jan 2021 17:08:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzigKuENUNL7HJjolVT+357RAwWFyDJ0rPIrd0ebGpxDKE/oXHHlkghVZ94R7pIQe+CYbd X-Received: by 2002:aa7:d886:: with SMTP id u6mr7273809edq.139.1610154487766; Fri, 08 Jan 2021 17:08:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610154487; cv=none; d=google.com; s=arc-20160816; b=wvOU5+xnCWAvvQqzA+5l0NZ4Lxxj9jTt33KcHwg4z5iPx9129ZBQyVHPxFwRHCv6/L CgK5HxwX/jt2VcjfivUWCYNwM0WtlppqhGI6bTS13RBvhubE5uYGkMcHG00veGswbihT zqqr+JvgOBBs8fnHgg+3aj+dx+LAiNQYs46MHOsnuA0eH+Kv0Y7tQoZWwlcLgg6BCzOC XEKoR9hMu0LY5T5aN7leSKTST1Pm1HxLthgXt14+mD0Ka18BURN6i7QywksTQ+ylZWQe dnhVLENsjJFe0rVz+a6XNfhaxGF6rn6LHkLeoKX4muW7eklkuL00ZPePt76OJB2UbtXM b5ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T8SDUdzx1DLheCzLoyrLEGQyCwv1obD1Uy5JaUB9koY=; b=G73N0A3Y5cPGohJlDjovlb2vYgBd5e2yedWOaIqrmU2ZrYFXIYn+/krESOMprMB1lI FMlD44wwqaQhpUZLNXW6Fr8S8JNAZ/X674ZU5Px1p6Yh8RGoeBiHab4f7fqhBwZhlbkS jPhW+ixgnp7b8VHpVXZGmQ1UyYfaW7m0ZbFJDrlF7rFMB97lVlq6YTVaBkWvXvwZeY2x LBmDOPerP9+onSbKE3/+50/559IIvp5crZctgMTJdOZhuXugErsPBw5CKN2TdvXPrZfA h2sx9BOJuO3WnRK9FfeFjgfuEaSq1mBLHnKH9mPbxiSv6e6U8WhLRHAChNS4N2dleCdY L1MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="ove/+5YP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu1si4028893ejb.20.2021.01.08.17.07.44; Fri, 08 Jan 2021 17:08:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="ove/+5YP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726098AbhAIBEZ (ORCPT + 99 others); Fri, 8 Jan 2021 20:04:25 -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 :-)