Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2583570rdb; Wed, 4 Oct 2023 05:56:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcxI0xJSL+E3AQTngGImeZ7rXtew+K/+iYTd0tKBoxDTYq70GyG2k2D01eRP4/fVhEoqsl X-Received: by 2002:a05:6358:788:b0:133:428:35dc with SMTP id n8-20020a056358078800b00133042835dcmr2443342rwj.11.1696424187454; Wed, 04 Oct 2023 05:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696424187; cv=none; d=google.com; s=arc-20160816; b=dYD+WaAH1D7X0qDTZ41tia+ZyvDmx3BAVDbpw2CHXExX/fJofdzi4uZaY+G6p3pcYm XmKX2sZPtJqJJ4fcthmTGMFPutXhG+RuWx1swBDMGSq74grT/xyCgSKsOxSCu8usWQly n4kbWhdnDMyqD14o6YVeuGd8IMkUrA0id7ncr/5a6Eug6Sd/bBCUHmvVMYmmPYofjjFc 8T80tH4YHlUxtambFDf2H9DxRp4XAPrtzV0K4V3eYF94tRs0kGTM1QpUtKMHT42VJ5tH FTEOyVz0oLmyK7eRVd7+EtypQQ7dB8sxl78vO5TxdOa5RQCo3nKs8YtkBAbSvvOn70TH 7rrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=tHxNdftNfbtBf2GFdPgNzG0RM9xd9rOW4AEyDiC7wEs=; fh=+2ZvzC6YTvScO1FibrFhj0Z7EfTDSJ+4dpdtcZ2IELk=; b=iiaMz1+olDzGwyFGbQsjNfZZFSOPkdWXnW+ZewpqsUVdc+IRWxEbR1Fx2A7FulirDU judu3LT6ZEmLJf/3X2P2KjF3IIzbXkMpGKy92hyRzbew+zD4fkvUamcWE+OW8GRelqsx zndnrab97KJ9Bs2pxfn+eNtuHdIVFE2mEL9u/jptUmlfNXhaKOf9Co9oRi+KpVvUmSbD bz/9YDr+KLZwwk/qLuU9TWQCHl1/eQNnImLgScVsyWRVAtsLSrGAop7Z7p67Ww/62CR4 pZHx0uV8QnLmtCoDxGXJ61yayM/c3GiypQq5jIR8/8/LooX4KLG8jWtCpn/n0WqHNx00 S0NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZiLYso9S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id r20-20020a6560d4000000b0056949c3eda8si3539603pgv.119.2023.10.04.05.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 05:56:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZiLYso9S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D34A782662D1; Wed, 4 Oct 2023 05:56:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242462AbjJDM4J (ORCPT + 99 others); Wed, 4 Oct 2023 08:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242472AbjJDM4J (ORCPT ); Wed, 4 Oct 2023 08:56: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 05B0DBD for ; Wed, 4 Oct 2023 05:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696424118; 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=tHxNdftNfbtBf2GFdPgNzG0RM9xd9rOW4AEyDiC7wEs=; b=ZiLYso9SYQ8eXe43O5TPLbUR2htpNKzc9NEMDgvgCmNSz/yuIfZphFWhofoMugV5DWJRRa DJZwGtYoaL3mkL9Yx4svLiGoUTE2LudT7gmsuWNyatP6k+4ty7bLU9ygYgSbcAbb4GQX+A qhqyH955/6A+ZTTaP9AMSWoypfXsYtU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-201-eTIlFov2P4ido5HDamKyMw-1; Wed, 04 Oct 2023 08:55:13 -0400 X-MC-Unique: eTIlFov2P4ido5HDamKyMw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5DAB28039C8; Wed, 4 Oct 2023 12:55:13 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54C2D40C6EA8; Wed, 4 Oct 2023 12:55:11 +0000 (UTC) From: Florian Weimer To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Phil Auld , Brent Rowsell , Peter Hunt Subject: Re: [PATCH v4] sched/core: Use zero length to reset cpumasks in sched_setaffinity() References: <20231003205735.2921964-1-longman@redhat.com> <20231004083648.GI27267@noisy.programming.kicks-ass.net> <871qeaefco.fsf@oldenburg.str.redhat.com> <4a4076c4-c6ad-063d-a2e1-3048cf71f723@redhat.com> Date: Wed, 04 Oct 2023 14:55:10 +0200 In-Reply-To: <4a4076c4-c6ad-063d-a2e1-3048cf71f723@redhat.com> (Waiman Long's message of "Wed, 4 Oct 2023 08:41:21 -0400") Message-ID: <87mswycztd.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 05:56:25 -0700 (PDT) * Waiman Long: > On 10/4/23 08:34, Florian Weimer wrote: >> * Peter Zijlstra: >> >>> Subject: sched: Add CPU_FILL() >>> >>> Add the CPU_FILL() macros to easily create an all-set cpumask. >>> >>> FreeBSD also provides this macro with this semantic. >>> >>> Signed-off-by: Peter Zijlstra (Intel) >> My main concer is that obtaining the size of the mask, or at least an >> approximiation is not exactly easy. If there's an expectation that >> applications reset the mask more often than they do today (I don't have >> the full context here), then we'd some decent interface to get the >> approriate size. > > I believe the macro just use sizeof(cpu_set_t) as the size of the > bitmask. It is the same case as in CPU_ZERO(). I mean the CPU_FILL_S macro also defined in the patch. Correctly written applications should not use CPU_FILL and statically sized CPU sets. Thanks, Florian