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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 152A6C76196 for ; Tue, 28 Mar 2023 11:38:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8D4C56B0072; Tue, 28 Mar 2023 07:38:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 86BAE6B0074; Tue, 28 Mar 2023 07:38:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 726FA6B0075; Tue, 28 Mar 2023 07:38:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5FC4C6B0072 for ; Tue, 28 Mar 2023 07:38:49 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 20F90ABB20 for ; Tue, 28 Mar 2023 11:38:49 +0000 (UTC) X-FDA: 80618109978.21.A15ED69 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 5D922100003 for ; Tue, 28 Mar 2023 11:38:47 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TXBdL1RA; spf=pass (imf14.hostedemail.com: domain of frederic@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=frederic@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680003527; h=from:from:sender: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:dkim-signature; bh=cIU73uZAPETkegjxRuuYfoqpT7fkVOB4NcpXsVljnOU=; b=m5C2hR+PXKqghjrHhfL0LFEo+/jtNrG14nmtEgBeHBiaI/0+eTab9YSN3Vr2zt8T1F83xw xRFpnvv5JMizPyOss1747MvsMoQSK5OmU/Bn0PU4gIpADUJemjDE8FOAxWuVAmNarQgM52 C7OfMrgXAPeGAuiXFcZemJYkNVCm1N4= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TXBdL1RA; spf=pass (imf14.hostedemail.com: domain of frederic@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=frederic@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680003527; a=rsa-sha256; cv=none; b=C8gCnOCkDf9n56fX0KVHqkrbrxqUDat40goXASYDCmkvQELromjcEaEqDu4K1nOnM0GdJ/ VWJWsQCK7FMPa0pR/2+uVzaRlxaiO5noRKfap02IRK8wUid2f6s1e7zyzZ2nOE+O0nYty9 ahLxyhWXbzlFnnX/93P2zXNKpsTkHPU= 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 50B54616DA; Tue, 28 Mar 2023 11:38:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61D88C433EF; Tue, 28 Mar 2023 11:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680003525; bh=jOmrs/Lchl59dAkRYGNIhG6/nypGKLzZbxjHzoW4mfQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TXBdL1RALxKCk3tpTvdW+ixaWAD/0SsshjdwXvmH8P9hpo6oNhoKa6ijmxu9vljze IwKi5Yj2uz+xgwqKnWglcpcvOP7WeKFVnmVhKl7CsSyjbo+mBbmUWr3UBLZB93cuoK XB3+IE1O0Ed6CcAXtIppJDAc6C9c3jGLnFcTq39vlwKMTrRwfamVrDqDmsxvHS380A t+2o5gJWTkxoYgjr435kPSfKPdad19ykRkuJso4zt1PaXJ+H1IUHXKBW2++kyHn8z8 yqlSIFxiwGJcYZkNQoDN8re986Nf0lI/xTaEClN9vatYwz24DjDz/n72JZn3x3Kiy+ jCrrG/Y8zJ10A== Date: Tue, 28 Mar 2023 13:38:42 +0200 From: Frederic Weisbecker To: Marcelo Tosatti Cc: Michal Hocko , 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-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5D922100003 X-Stat-Signature: h1ko3yi5n8fdga6n8echahqitgoywy9r X-Rspam-User: X-HE-Tag: 1680003527-506475 X-HE-Meta: U2FsdGVkX18PO8Jvgn4uiysjrcWDE/TS5nCtL3uLu62piYAf9PNicevv2jFXQMmnGvVub2ZrsWS17J/Ws2ndmW/kkezpgJc3LCy/Ea7tiS0TMvdoNUl3sAtU+0XY1CuNTi/W4aGrhHwClQhk89xTZCnjHzjU7Imfuh+Ly9w5BoQI34wIc75PunWM3iGc1GD2Xih/aTGu5WoNKtffrTvPMPn5aOyRTL5dE5LnTtS+bNBvmQ8v6tb9qUcE3qZBMFASRlZNOHeu1VOj+COul2OQWqvsMMT0c1NWTuYxayT9R1s/O0ND9neOr6uZXTHhc4wFSDxk5R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djs9Qr2N X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Mar 27, 2023 at 07:24:54AM -0300, Marcelo Tosatti wrote: > On Fri, Mar 24, 2023 at 11:35:35PM +0100, Frederic Weisbecker wrote: > > 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? > > Yes, that is the case. But as a note: for the two main types of > configuration performed (one uses isolcpus=[domain] and the other > cgroups, for isolating processes) nohz_full= is always set. > > So just testing for nohz_full= would be sufficient (which perhaps would > make the code simpler). Ok then all is needed is to test tick_nohz_full_cpu(target), right?