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 B7467C6FD1C for ; Fri, 24 Mar 2023 22:35:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E8366B0078; Fri, 24 Mar 2023 18:35:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4964E6B007B; Fri, 24 Mar 2023 18:35:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35DD2900002; Fri, 24 Mar 2023 18:35:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 26D1F6B0078 for ; Fri, 24 Mar 2023 18:35:45 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E7AB380A23 for ; Fri, 24 Mar 2023 22:35:44 +0000 (UTC) X-FDA: 80605250208.06.861B4F0 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf24.hostedemail.com (Postfix) with ESMTP id 1896018000F for ; Fri, 24 Mar 2023 22:35:41 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Un9oAj7v; spf=pass (imf24.hostedemail.com: domain of frederic@kernel.org designates 145.40.68.75 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=1679697342; 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=tsWv4atPbB270xiRFfwTSgqKMpRBTJgaPyPJSt3yWuA=; b=8q/9TkQ4crxdyQwiqhoDm11ju9MgfKK/MV+JRZ/is5vTevUA6KwjJt6sMwo4Rmtca50oU4 uH5crwHBToR6PH7g7cPd0kmz9HjPrKT9PkD+r4PfPQeOlMqLaF+GwU72UiI0A4H4jZUp6t uEAk3GhJyy0v1hHS+6UwOL+B6xG4cp4= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Un9oAj7v; spf=pass (imf24.hostedemail.com: domain of frederic@kernel.org designates 145.40.68.75 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=1679697342; a=rsa-sha256; cv=none; b=k30TcS4ZZ4hV4aIDa7WGSiv7dmfiHCtXyQw1wLCfNALuZEZrFuOlXDZSkiRE8v7hfu/zx4 CPgzUM7w6P+RmNwEv4HqLozahznzkgI/Mho3FwyJUS285W4rOhr98jaVzknL54lG0q3A/e kIfH56bsOm6ZHGtwq3D4mhWfHzr+5pg= 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 ams.source.kernel.org (Postfix) with ESMTPS id 3036FB82624; Fri, 24 Mar 2023 22:35:40 +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-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 1896018000F X-Rspam-User: X-Stat-Signature: xfrqkf5hq4g3ixj95gimeh88yrtwx1kz X-HE-Tag: 1679697341-45408 X-HE-Meta: U2FsdGVkX18CUn1P8CFb0jKFvdyLtDgauUJ7ySs/L9d6njsHtNIl6OC7cwC3bh1jc6i+kDUOZUZ3fS8MCEwP2Rq56B/TdgJCKVYYX6i4Hl78QfoLrbpgb4ONMw1OxRQhtkrtKZ8m0JhfC9CVFGUiwKMjAncKiJ04XnR6LYsy7pvYKyDXzF1QwnlLpfScjRIONKrPRbVpAhT2GA3WKVXH52IsYnEfJxhIIdbi7VQBij0w7wOy0UFQtOe9qVXQ+kwSDPaGB6EEJRQQVCieLAPiRzaFJ3SN+9XbNZdDbhMwcYGDPKqqel/kWv1sDQG5XAur8zfb3ej5hTv/LaOZhUL/NrKd5p8UsR9fSTh2Cwv++3OW4RTBxcf51nCkv4v8lWNmoulrBxQjDk0rMaSR8RP85dnuT2Cd4CpnpkrA8B7kXReNXh3QmtJIjv8CAeaQm2FVa+r5Zo635JCO5F4TruCCGXHy3eVOFDQ3efrRLPjitSwCvAVP67CK8TLuwOALb/ZgkmgCS2KMUsKLmcShVwSKf4rBObsv7vBOKy5U6+LBUxWaz7uGA+J+cxX3rY7nvd51p4oOw9ls/jrqYsnsJ1XLzTq3ENrEvC/xdpg8ywT+2wsQvWBaWBmJ8+pIHcFW8Cq72OX7+nRJEbVSPdi1LhnXt/Du8X2W+chWnAIlAqbaTIMM390BETvxTTnwEdiGdVjHs67zPWYsttrawxM4HY5gG9B2Aon+hBOdDBhJ37VfYQ7K1v4+Dbzb5DdUKshr+IR59WlTQ6sQejxuBzNrlN9jHzGGZU2bUFypAZyZKz30bQ1MPx5RrpqZ0rjC7AY9pP8DlP9fU+p4K2ni8BoawUC9E9vPpjs5R4kiwzM/JUoL8Bn0KX+QZoLXhpimfj5Zb2gJyWL3q6D+8x/fRqdQQt+LigEuMD2CwT8gGUGIUbvjPzxoca8IsOyCPQV4UG+pT1EweKaP393rmHB/Xhe0E/r howZoRci 01R7pzY3qgUOvBM6NngSj5Mw3kemBeawjFWJ8S9VUpk+/Q+GpxB4NLb7GgqE+OARyJ++xx21P4PunvI45rI0CQxAA8RmvbbbslXOgnRzuE2Pa8J/DCnFn/2YUrRPc1adWjH2Q5ExR0Vut5icU1HZYC3jgdhISCf/xbm+panVXm3LmA9kX3f7ASbrfl0h2RKgARzVACW2xdmqE3uQ= 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: 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?