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 3D207C74A5B for ; Fri, 17 Mar 2023 18:36:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7CE6A6B007B; Fri, 17 Mar 2023 14:36:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 757ED6B007D; Fri, 17 Mar 2023 14:36:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F7576B007E; Fri, 17 Mar 2023 14:36:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4C94E6B007B for ; Fri, 17 Mar 2023 14:36:47 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id D7297A1406 for ; Fri, 17 Mar 2023 18:36:46 +0000 (UTC) X-FDA: 80579246412.29.F52085F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf01.hostedemail.com (Postfix) with ESMTP id F296640009 for ; Fri, 17 Mar 2023 18:36:44 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iMSTYMI1; spf=pass (imf01.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679078205; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=itVFT7T9k2vMULidRgUTx/fUeL9djtDRWADa6m3161Q=; b=oU2J8h1yJAXl0YK09zIAVZDlx/2Kliy4TvV0K3AN3R6udOy94GtFLIuDnv2mc0BGoMfgzg ojkkHzzJMSg+nRRiFVXLkD5npEslv6m39UKLR48/O0/UTEToTCM8kTiZ4d/GMoKchIqUCH DPmHc7Pd7kZyxfA3SvKQG88sViX5grk= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iMSTYMI1; spf=pass (imf01.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679078205; a=rsa-sha256; cv=none; b=ahcMVh5tcsHLjKyRiJMOR8o7+qod2TyJtvA+/C2WUJHCqtDEve7XrKrpQAYX4bNDvLT3zK LwPOCaS9Irlh7gTsOjdfolDqQhdLkv5VTqntO9pGco4ImefCLMwb46W/VZvjFRo95evdMD fGDEoXSC3DB0fDTT3+yWJM6UwdLFFo8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679078204; 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=itVFT7T9k2vMULidRgUTx/fUeL9djtDRWADa6m3161Q=; b=iMSTYMI1K9kBRoSf+2MVGBKuIKEh7uhOv8J6Wjrd1cQr5Nk+GXZNadDjRnStJgoasA4oKi tw/OtBMWjNQzH6mY86y7oDT7hYy46f4UkvcPBvD/x9Ue7yVaynheisoWtuDaj3VcXsexNB MuVGfZuQVfvCfQBr57Eiq9dJN26jB+M= 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-515-fSPug8BEN5u2awmq6oRD9Q-1; Fri, 17 Mar 2023 14:36:41 -0400 X-MC-Unique: fSPug8BEN5u2awmq6oRD9Q-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 50D061C12988; Fri, 17 Mar 2023 18:36:40 +0000 (UTC) Received: from tpad.localdomain (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 03A662027046; Fri, 17 Mar 2023 18:36:39 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 66CCA403B5BB4; Fri, 17 Mar 2023 15:35:05 -0300 (-03) Date: Fri, 17 Mar 2023 15:35:05 -0300 From: Marcelo Tosatti To: Michal Hocko Cc: Andrew Morton , Leonardo Bras , Frederic Weisbecker , Peter Zijlstra , Thomas Gleixner , Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , LKML , linux-mm@kvack.org, Frederic Weisbecker , Michal Hocko 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=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: F296640009 X-Stat-Signature: kz1x9a3pwtusjghrkne5q5mk3uyhhyps X-Rspam-User: X-HE-Tag: 1679078204-155153 X-HE-Meta: U2FsdGVkX1/OLo35riNUKVA4oiwzUjdOYNSDG+2laoa9preVPAN5QKB34D2yFjkVmgWJyyJa8ckv/5x+aF+QnrA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U51hR+T2Wbh90fWlc0yM6rTQNi05/TyYmdbj2Q263QrQ++Od/BCFNa4zVw/2kqpNBCvbISs7hBm8Swt/Z1pwZHgFs0OiKOQTf4DA== 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 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.