Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp830733lqa; Sun, 28 Apr 2024 06:18:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOCHsu0YGSzjP7ZZvw3kOkKLzaMzPEJL2yZf/ZC2+R7rhm6nj/sIahJPdsxUqxSH6FCbS9SHlmO2KucyAhjBYXmEBUsxXgHbo0IfeNIg== X-Google-Smtp-Source: AGHT+IEMlkq8X+LjOzRkwhZshvXfJBTcGy1mqvyEW34JG19510QD7Eh355PPVOAsqO37uV/bH6ia X-Received: by 2002:a17:902:e852:b0:1dd:6ce3:7442 with SMTP id t18-20020a170902e85200b001dd6ce37442mr9357373plg.39.1714310307207; Sun, 28 Apr 2024 06:18:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714310307; cv=pass; d=google.com; s=arc-20160816; b=oNBphvDOV4dzqR1+a87C7/YToKil1N7J5ppf/Pdr2YoHB/yvOTJJgENgxD4Acil1ck DLoAKgRMJhiKOlflVzwFqys88hgcswHbbo1BZ+F+9pD+WNZEVajOA4fLar0BpqqgTrXN 07hLHC7j6i5RhBHg1LeGeZOLYP0HcuxVtGql7gjpZkrs2CwpB+mMVkT0oTBWdeArRYi8 3B86PhrdYffN4WCQkinDjagGzxhez25xkG6BTYELHDI9NyKFshIujnLI8nTDu4K9URdc udNvMQ9WNoCzNTKnzvtFnshhzPoZSgxgTX69FNuzJrIPfvXu0+5Bo9IbvruXNU/FwVHn FZdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=CgfUEtVUVqryBOU20Pw4HvjHv8QjwbFcKFGTsksoSUQ=; fh=MTbvMc80SuIVZC5tFJXvRTTdN0BrjRfloie2KSFeOwI=; b=DbL2TZvQ/iclccEwYhasuQlgQlMV9TW77INFaMeA1ubB29YxJMmga+sW9qXQRfJf8o 4dFIHo/FhuLYhUqi3mXFyNIBTRKfNfjVunauH1uGHfXPO5yUhKCIH3xH90x1uQS5gd66 8aB72FehZQzIxAnjby9ftIG4bguvzldP+AoFIot41Zs8kyfgIYroQhYebEJMM2BZTh6w pnXnOKMbeqrmv7Apj/hf58s80LCV3DY7PdjXaRPvtciBnubGJuLGlA7wme0kL4SPsWqq L+kwn1A6OKfEYJKPs5iyw5uxzmrkSb2AP09JV9YHB6mN2t9NZJHRYjH9Kr3xsy6Aht1g /PwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UQqmfCYC; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-161433-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y2-20020a170902700200b001e4a87f3424si15141397plk.445.2024.04.28.06.18.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 06:18:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161433-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UQqmfCYC; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-161433-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D1D4B281A18 for ; Sun, 28 Apr 2024 13:18:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88CC16BB2F; Sun, 28 Apr 2024 13:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UQqmfCYC" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 E6D90653 for ; Sun, 28 Apr 2024 13:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714310300; cv=none; b=Y1CmcUhoCGBOFy8hLZqs4BhmREfwhrA5RuWNc4Rlu/lsPxR1+9gw+PmrF0eJl/TnfttaElfj19O64H+1yPv/IyhOA89L6Y8OnFudn7Vogs3TVrC/vsgylXkTNIlA06ViJ0CIi+ucoZpeSbf/LYy/66hoLTL2l0dcexK0Sb+povI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714310300; c=relaxed/simple; bh=CgfUEtVUVqryBOU20Pw4HvjHv8QjwbFcKFGTsksoSUQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fBd/beGL2R595/cnTQXge94tivU/ZuTXMfJhVnD1EL0W1GryxSS/UF4ofTM3KJi1qeJXfOh7PqnX6y99TVwpbnAHPrLSFKc4wb2YIphoaC7bqmPNRPmfFtGppZSzMgBSlOT41XdBOHlQ2FQYPIaIVoLTmdWACfwWgBvJS7ZtyGU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UQqmfCYC; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714310297; 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=CgfUEtVUVqryBOU20Pw4HvjHv8QjwbFcKFGTsksoSUQ=; b=UQqmfCYCTFUXnyECsueKpM3+LZvAx+UWzew7WPHL+GDmEtYxPFwxsyHA9bnp3CqLm5ipXU OSrl1Dx1A9a5C7627/hLcm88MQdUHf4uRJ5cob0zsGW64v6JdFJjcCP7XvFCKtTFlpYTnH OAHY9Zi2QOIMuRG/jD4rvikk8E4BOSA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-383-ZC-jobWDMySgLHBythwwfg-1; Sun, 28 Apr 2024 09:18:14 -0400 X-MC-Unique: ZC-jobWDMySgLHBythwwfg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E55E98059E0; Sun, 28 Apr 2024 13:18:13 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.143]) by smtp.corp.redhat.com (Postfix) with SMTP id 37A2040C6CB1; Sun, 28 Apr 2024 13:18:11 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 28 Apr 2024 15:16:48 +0200 (CEST) Date: Sun, 28 Apr 2024 15:16:45 +0200 From: Oleg Nesterov To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Thomas Gleixner , Phil Auld , Frederic Weisbecker , x86@kernel.org Subject: Re: [tip: sched/urgent] sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU Message-ID: <20240428131645.GA20436@redhat.com> References: <20240413141746.GA10008@redhat.com> <171398910207.10875.4426725644764756607.tip-bot2@tip-bot2> 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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 On 04/28, Ingo Molnar wrote: > > * tip-bot2 for Oleg Nesterov wrote: > > > Another corner case is "nohz_full=0" on a machine with a single CPU or with > > the maxcpus=1 kernel argument. In this case non_housekeeping_mask is empty > > and tick_nohz_full_setup() makes no sense. And indeed, the kernel hits the > > WARN_ON(tick_nohz_full_running) in tick_sched_do_timer(). > > > > And how should the kernel interpret the "nohz_full=" parameter? It should > > be silently ignored, but currently cpulist_parse() happily returns the > > empty cpumask and this leads to the same problem. > > > > Change housekeeping_setup() to check cpumask_empty(non_housekeeping_mask) > > and do nothing in this case. > > So arguably the user meant NOHZ_FULL to be turned off - but it is de-facto > already turned off by the fact that there's only a single CPU available, > right? Or the user passes the empty "nohz_full=" mask on a multi-CPU machine. In both cases (before this patch) housekeeping_setup() calls tick_nohz_full_setup(non_housekeeping_mask) which sets tick_nohz_full_running = true even if tick_nohz_full_mask is empty. This doesn't look right to me and triggers the "this should not happen" warning in tick_sched_do_timer(). But let me repeat, I know nothing about nohz/etc. Oleg.