Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1779987rwl; Fri, 24 Mar 2023 15:42:25 -0700 (PDT) X-Google-Smtp-Source: AK7set/E7odKNMufLeDhhd5wjG7Z6yIn/4o98yFBgL72c3ITXQRkMKLcelEIstt6FS8C0chXP35j X-Received: by 2002:a05:6a20:be09:b0:cb:e735:65a5 with SMTP id ge9-20020a056a20be0900b000cbe73565a5mr3860146pzb.40.1679697745443; Fri, 24 Mar 2023 15:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679697745; cv=none; d=google.com; s=arc-20160816; b=EDmsdb0iYMNbUUROUzbZKh+ZKG1YyWj6HaPD8TcFacUHp8zB/U7qDfZnJJYmIFhpBJ VCWMYLQ/QWGwNJcOvUBGqAD77RGcNZ4E5Ns25YOAWEgcF5aj5niGRVxSsffO4MDWj08E lACQPyQ3BQIsNMiQkPJlIvuWOIa5D0pLZxrxvkiL95YYcGRqUj/Qdd48PjSsi5egQ/E5 E1yiThPpAjwIIngxCympUsf5OwmXCoLmGx7mMnZw0vEJI0u8HrpPwCevRso5ixD/Alv3 lpyvHxQ2Y+6efz9Sh1vfQIqu1r2UvNw9qmS5EKKp40ZWSM/EBMAEomyiWIHeYyPINqfD Se+A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tsWv4atPbB270xiRFfwTSgqKMpRBTJgaPyPJSt3yWuA=; b=0x9kjR43eOVpDXGy+it4DXzQQyfvdKzACFel/Jgk6Q+fD4Pc12XLjQj/crqzX+F3cQ 7Z8N3MWIshXFLvfyhjMnXTLNwiMQgX1yVmb/cJtHAei+naWGiSSEFIDEaPO5I6m8HgL8 ydNqTPZnZr0Rxqt6eE7jBPezhfaMgVNTsDoYDgMtEhnzHu+ZX2en0PisOA0ZnB38SXZ4 xxXXfEq9AXgYljMhE82D31e82n8okuSAAMYbeFHJyHF5o5j8uTnxZzEjbkp93++AHa+D 4Kr+CiLs+3zxcco6TcJuIl1/FnJO2BBFUJs5jlqEldgcr1+iVApaNjYH8kzBGAEMLMbM iYsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Un9oAj7v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l191-20020a6388c8000000b0050bed6344f7si22439728pgd.833.2023.03.24.15.42.12; Fri, 24 Mar 2023 15:42:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Un9oAj7v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232434AbjCXWf4 (ORCPT + 99 others); Fri, 24 Mar 2023 18:35:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbjCXWfv (ORCPT ); Fri, 24 Mar 2023 18:35:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E665E158BC for ; Fri, 24 Mar 2023 15:35:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8A72962CD2 for ; Fri, 24 Mar 2023 22:35:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 913FCC433EF; Fri, 24 Mar 2023 22:35:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679697339; bh=AJznxyTi+9ibmvUCVoVEBVdGmWNhBJpPN1aUusOcKhE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Un9oAj7v3GoOgoCYcr+DInFeiwUaIWhhZ20bttbZyDcjizFSNiYFo5zrIevyN5s4K TebBv3TENCsBTLBwEn2yeGlGNWEUtCMXMIxtx+WZCah8knZQq0nRLXTyituF5nIaV1 5LxdNu/ubLWVAq/5ipslfYQxR9NsWmJf996q/2uv92rnQa8t2km0eAWZ963yxcHAKh HLeX9+f5Cq6iG/45KSFZWOLZ7k51lw8gJ7eI3fFagmgVWMyvZue7H7iu2H4jMYenBm BnaC52X7M+4f16Hxm2QCWg/u9QN3caQfI7MYFSg5izEssCttzDDzUD7At4TMWM7JHN R3UHyYEsjBjUQ== Date: Fri, 24 Mar 2023 23:35:35 +0100 From: Frederic Weisbecker To: Michal Hocko Cc: Marcelo Tosatti , Frederic Weisbecker , Andrew Morton , Leonardo Bras , Peter Zijlstra , Thomas Gleixner , Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , LKML , linux-mm@kvack.org Subject: Re: [PATCH 1/2] sched/isolation: Add cpu_is_isolated() API Message-ID: References: <20230317134448.11082-1-mhocko@kernel.org> <20230317134448.11082-2-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le Sat, Mar 18, 2023 at 09:04:38AM +0100, Michal Hocko a ?crit : > On Fri 17-03-23 15:35:05, Marcelo Tosatti wrote: > > On Fri, Mar 17, 2023 at 03:33:13PM -0300, Marcelo Tosatti wrote: > > > On Fri, Mar 17, 2023 at 02:44:47PM +0100, Michal Hocko wrote: > > > > From: Frederic Weisbecker > > > > > > > > Provide this new API to check if a CPU has been isolated either through > > > > isolcpus= or nohz_full= kernel parameter. > > > > > > > > It aims at avoiding kernel load deemed to be safely spared on CPUs > > > > running sensitive workload that can't bear any disturbance, such as > > > > pcp cache draining. > > > > > > Hi Michal, > > > > > > This makes no sense to me. > > > > > > HK_TYPE_DOMAIN is set when isolcpus=domain is configured. > > > HK_TYPE_TICK is set when nohz_full= is configured. > > > > > > The use-cases i am aware of use either: > > > > > > isolcpus=managed_irq,... nohz_full= > > > OR > > > isolcpus=domain,managed_irq,... nohz_full= > > > > > > So what is the point of this function again? > > > > > > Perhaps it made sense along with, but now does not make sense > > > anymore: > > > > > > Subject: [PATCH 1/2] sched/isolation: Merge individual nohz_full features into a common housekeeping flag > > > > > > The individual isolation features turned on by nohz_full were initially > > > split in order for each of them to be tunable through cpusets. However > > > plans have changed in favour of an interface (be it cpusets or sysctl) > > > grouping all these features to be turned on/off altogether. Then should > > > the need ever arise, the interface can still be expanded to handle the > > > individual isolation features. > > > > > > But Michal can just use housekeeping_test_cpu(cpu, HK_TYPE_TICK) and > > > the convertion of nohz_full features into a common housekeeping flag > > > can convert that to something else later? > > > > Actually introducing cpu_is_isolated() seems fine, but it can call > > housekeeping_test_cpu(cpu, HK_TYPE_TICK) AFAICS. > > This is not really my area. Frederic, could you have a look please? The point is to have a function that tells if either nohz_full= or isolcpus=[domain] has been passed for the given CPU. Because I assumed that both would be interested in avoiding that flush noise, wouldn't it be the case?