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 ECAA1C636D4 for ; Mon, 6 Feb 2023 16:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231294AbjBFQw2 (ORCPT ); Mon, 6 Feb 2023 11:52:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbjBFQwO (ORCPT ); Mon, 6 Feb 2023 11:52:14 -0500 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 0989393C9 for ; Mon, 6 Feb 2023 08:51:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675702218; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yVEU5w2/bUVcxkdB59nbmmH1xHTXkQRMgUkXR85IDjQ=; b=iRNdUIhYj5CUCsTArPjY1Xc9xkkWVEiiDW5cFLzyy/eyVtAIYEB5IdqObFtc3bFwgTPBqi eu59p53xydWx1tMUHnXywBPWUIguDmFR3E1bRSbe6KLL5ZTnmjiVDUg1VMlgsDMGQ7krBw L9wXBJhIi63gkRBvafHtP+dM4TemDLY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-177-iLALzcXMP2-7At9fxoyNzQ-1; Mon, 06 Feb 2023 11:50:13 -0500 X-MC-Unique: iLALzcXMP2-7At9fxoyNzQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 29DFD3804505; Mon, 6 Feb 2023 16:50:12 +0000 (UTC) Received: from [10.22.18.235] (unknown [10.22.18.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id 75CF42026D37; Mon, 6 Feb 2023 16:50:11 +0000 (UTC) Message-ID: Date: Mon, 6 Feb 2023 11:50:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 2/2] sched/isolation: Add cpu_is_isolated() API Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: Frederic Weisbecker , LKML , Roman Gushchin , Michal Hocko , Marcelo Tosatti , Leonardo , Johannes Weiner , Shakeel Butt , Muchun Song , Andrew Morton , Peter Zijlstra , Thomas Gleixner , cgroups@vger.kernel.org, linux-mm@kvack.org References: <20230203232409.163847-1-frederic@kernel.org> <20230203232409.163847-3-frederic@kernel.org> <0f388863-9498-e61e-e2dc-965654544489@redhat.com> <20230206154710.GC21332@blackbody.suse.cz> From: Waiman Long In-Reply-To: <20230206154710.GC21332@blackbody.suse.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/6/23 10:47, Michal Koutný wrote: > Hello. > > On Fri, Feb 03, 2023 at 10:53:46PM -0500, Waiman Long wrote: >> CPUs in an isolated cpuset partition is similar to HK_TYPE_DOMAIN CPUs as >> load balancing is disabled. I can add an API to access the cpumask and add >> to this API. However, that list is dynamic as it can be changed at run time. >> Will that be a problem? > I can see a problem already -- as a CPU can be dynamically switched to > "isolated" mode so should all dependent operations support that (switch) > too, i.e. the CPUs local PCP caches would have to be drained when the > CPU enters isolation. I see the long term goal is to have more isolation capability to be done dynamically. However, we are not there yet. There is still a lot of work to do to achieve that. > >> Or should that be used separately? > It'd be nice to have both (cpuset and cmdline flags) eventually unified. > > Alas, it only leads me conservatively to: > > #ifndef CONFIG_CPUSETS > // the proposed implementaion > else > static inline bool cpu_is_isolated(int cpu) { > return true; > } > #endif That is too conservative from my point of view. We can have further discussion when a patch is ready. Cheers, Longman