From nobody Fri Dec 26 03:20:40 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 BD5BB4A9AC for ; Wed, 10 Jan 2024 11:46:43 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="c7jZh31g" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704887202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZJYdODU3wiLWDtYGGvI8tT8GVp8sktVt/9zuVN5SknQ=; b=c7jZh31gepuKYIsXrc9IbKXghnn1PAy9jCdmAZntbFeNG8eSRtWZHpQdpXLk4BCbNha149 SNxoAEPeUCWB1bF+KSvR6UflFwT5Gu3NR5HfEfzmeJQJ9b0ZZFAsjVUCb53wLXQt44FwGM bLN24VfeNNB8bZtD0+LK02WMeKGDA4U= 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-626-b6ny7NZ1M_ChO9SnTGNcbg-1; Wed, 10 Jan 2024 06:46:39 -0500 X-MC-Unique: b6ny7NZ1M_ChO9SnTGNcbg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 CBD1C830F97; Wed, 10 Jan 2024 11:46:38 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.193.232]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E7071C060AF; Wed, 10 Jan 2024 11:46:36 +0000 (UTC) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Frederic Weisbecker Subject: [PATCH] sched/isolation: Warn about missing isolcpus mask Date: Wed, 10 Jan 2024 12:46:10 +0100 Message-ID: <20240110114610.1941474-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 Content-Type: text/plain; charset="utf-8" Since an empty string is a valid cpulist, this cmdline option does not trigger any warnings: isolcpus=3Ddomain, housekeeping_setup() just carries on and we end up with the housekeeping mask being all CPUs in the system. Check that there *is* a cpulist and that it isn't empty. Signed-off-by: Valentin Schneider Acked-by: Frederic Weisbecker --- kernel/sched/isolation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index 373d42c707bc5..aa20cd1702199 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -120,7 +120,8 @@ static int __init housekeeping_setup(char *str, unsigne= d long flags) } =20 alloc_bootmem_cpumask_var(&non_housekeeping_mask); - if (cpulist_parse(str, non_housekeeping_mask) < 0) { + if (cpulist_parse(str, non_housekeeping_mask) < 0 || + cpumask_empty(non_housekeeping_mask)) { pr_warn("Housekeeping: nohz_full=3D or isolcpus=3D incorrect CPU range\n= "); goto free_non_housekeeping_mask; } --=20 2.43.0