Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp121475lqe; Fri, 5 Apr 2024 15:04:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0Y9UX7bmY8e0CaNb2YVUskyiQqAqs7pAAsu1PoPpQIaLIq52A4OVYmBma9sLZs9gov+U3Ww9o1AWY+ogIcmTrVfOdheJZ4PHgaRoVbA== X-Google-Smtp-Source: AGHT+IEtsAs/12srs5Jzn5Eb+Dj/+hW84rJ2TpWlQXcrFikqFkzMqumD9pCLs/xF2f9gnUtJcCzt X-Received: by 2002:a05:6e02:13ac:b0:369:b635:b527 with SMTP id h12-20020a056e0213ac00b00369b635b527mr2729484ilo.30.1712354645764; Fri, 05 Apr 2024 15:04:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712354645; cv=pass; d=google.com; s=arc-20160816; b=z0q/O1+CC6hPHquTx36lSK0ZO10EUs/8jES6LdV7ph4F0rZY/FTk1Cz1vohvGGQDYL NwlX/K9VF7VSHvXd6UXjyOouFjlVHPgyv7ENshkblCiOdkxA2j+urK2Mb235ke+CJ/Xq 7qmbDtBc+ZoQV/Xbl3x6/5ASGekGcnWl68cpMONWgKQyTdNpCy4aHV7rkQKu+pDTeqEx m30Si6Ara5afxdLf8xXZTQBarPINt12SzGRsw2zZ5l3XC1r1lT8v/+RmUFwL/ToVQwha X4XxkVtdl1Hn0ojFpqzVBQWqirrhFho9cb/jAimUjbjD2WvctUCtKjzcSudIgM85Ht/7 yoOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WBTtztMPe/1ueJsY3ZRQeRlKnK9g1o9rd5LtLsrVdLc=; fh=PoA6DvHWBuexNmk6eUvxKiVnSyiTe1QQ/cooeGi50AI=; b=NjCBYDx6he2UtJBvz70y2rtDCDFuFHGS1eTwwTPQkS5ryKGq2MemNKeUTTq0NRZx4Z ZIBedJsqsDYqKl1iRezhUIPAtDt4mk8PqLuX0en1TG92/chJGplT+PGmbVzvQQJOHOdj IN+qj/6PDkF5wOCjtcjvUcIlplSek77t6FRI64SNsyhupEHpWeqZ+lMK7qdm2aUTIb6S qaTaKFdfwtAfGVmoHxJLcn+x9fc97vSHKTGhRpDDfepYFuVzwrZRFSZg4xuSNWZqhMnF uBFjqSJOVLdSluJ0RXk3zk2rMQvjgh+DXEzqk1shwQKLeqHubsFE1Ums4bljyGXsZ/m/ vpXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PXNx6pVw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j21-20020a635955000000b005f3a86728b4si1971316pgm.875.2024.04.05.15.04.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 15:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PXNx6pVw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 80AADB212BF for ; Fri, 5 Apr 2024 22:04:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72112175558; Fri, 5 Apr 2024 22:03:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PXNx6pVw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E3041C6A8 for ; Fri, 5 Apr 2024 22:03:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712354633; cv=none; b=UCEJ2Cq8BCiO4j65r7il5uojLroLMbYpJJXIufjEimLag8URQOpPWSTYGLos/9XHwBH0wWGvWoy6HxfQi+nsvjw606UH9voRxqPaDXKAGCkokUBL9i7n+H7COb7A5MBQt/JpmFdheUQUm2BD2CL5Cushk65z9kOi1M3kEhqWOPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712354633; c=relaxed/simple; bh=6fvBs5K7EkwFblWVj+nBmhxGER3ybYM0lpr/wQ+brfo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YcoCUnfc3aA6aW2zq426sNVBGldU2SDI5GQRcRDCFzG7WxNQocYrmGRZ22lyw0K1KHMPzAwV2hEv2rf7186QmQrLZD0aNGiPdR7LOuXQPNRkQR1jLEDaVg5KXyninNYaevB1gnkk9O28GPa6+k5qXkxODNpIhlO0N4dO/6WPe0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PXNx6pVw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95FB6C433C7; Fri, 5 Apr 2024 22:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712354633; bh=6fvBs5K7EkwFblWVj+nBmhxGER3ybYM0lpr/wQ+brfo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PXNx6pVwR6ygQIlRc1cKuJkSSToTejNTDZNmGnSBg4zLXBaJTQh5YwTKYtR80rHXD omlX+/AhgbpJtU7X1dYb8kyW+udZFaYp976wFsCLDTe6b2R14gCgSCI3l9y+0s7dgh 4+S5R+Y09ZbOijJAiKpUmZ5m01pcrWhw7nlaMgtLowktDqO/3i1YUzR9qACsqO7yyw /l0y2TQvoKb+rQWaQ5jbLo5uZWl665k3NraqDOPEpYyl/JWkLERjtMoGPXEtwJ1+C2 mrUhTbPtbC83j2AeacQER2QY1Vby+VI4cX4nf84weNSzwuKX4C7KjOv4PbCtn8LLCZ ea/miywIobfBQ== Date: Sat, 6 Apr 2024 00:03:50 +0200 From: Frederic Weisbecker To: Tejun Heo , Nick Piggin Cc: Oleg Nesterov , Leonardo Bras , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Lai Jiangshan , linux-kernel@vger.kernel.org, Junyao Zhao , Chris von Recklinghausen Subject: Re: [PATCH v2 1/1] wq: Avoid using isolated cpus' timers on queue_delayed_work Message-ID: References: <20240130010046.2730139-2-leobras@redhat.com> <20240402105847.GA24832@redhat.com> <20240403203814.GD31764@redhat.com> <20240405140449.GB22839@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Le Fri, Apr 05, 2024 at 05:38:54AM -1000, Tejun Heo a ?crit : > > > > > So it seems that we should fix housekeeping_setup() ? see the patch below. > > > > > > > > > > In any case the usage of cpu_present_mask doesn't look right to me. > > > > > > > > > > Oleg. > > > > > > > > > > --- a/kernel/sched/isolation.c > > > > > +++ b/kernel/sched/isolation.c > > > > > @@ -129,7 +154,7 @@ static int __init housekeeping_setup(char *str, unsigned long flags) > > > > > cpumask_andnot(housekeeping_staging, > > > > > cpu_possible_mask, non_housekeeping_mask); > > > > > > > > > > - if (!cpumask_intersects(cpu_present_mask, housekeeping_staging)) { > > > > > + if (!cpumask_test_cpu(smp_processor_id(), housekeeping_staging)) { > > > > > __cpumask_set_cpu(smp_processor_id(), housekeeping_staging); > > > > > __cpumask_clear_cpu(smp_processor_id(), non_housekeeping_mask); > > > > > if (!housekeeping.flags) { > > Ensuring the boot CPU always be a housekeeping CPU makes sense to me but I'm > not very familiar with the housekeeping code. Frederic, what do you think? I vote for reverting: 08ae95f4fd3b (nohz_full: Allow the boot CPU to be nohz_full) And if that's not possible because there are actual users of it, then the best we can do is to make housekeeping_any_cpu() return smp_processor_id() if the housekeeping_mask() is empty. Or rather if the housekeeping_mask is empty, return cpumask_of(smp_processor_id()). Of course that's merely just a bandaid. Thanks.