Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp924512rdd; Wed, 10 Jan 2024 03:52:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDg12H4rxh0A90p01NYR5lNUQxqimGUEg/0igaejOeV3wdYD6tzTMIRx72w+VEXQkX2YGj X-Received: by 2002:aa7:8dc9:0:b0:6db:5fe:ba7c with SMTP id j9-20020aa78dc9000000b006db05feba7cmr665976pfr.63.1704887549342; Wed, 10 Jan 2024 03:52:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704887549; cv=none; d=google.com; s=arc-20160816; b=Vl1CwYAWFKIvEZ2mUsZ/ZQEb15iu4DLtCP6MIkDpQSQZMAdIl5wrrIQXQTw991n97u fSTJIBiOghz8z4zvT49nqR8JIClBpwuZojiTiXzF4GM6fzttNOthpbhaZUhNK+BJidsi VGTlsefKlDyFoUjSOcUL52f2htiiX9umfyewPBbvkW16puXu1rTACx/ctRInn5deyb2e kysJ+D3EKK8l/+LgmTwU59E56Y1RiV8zzhX5ZycTLQ9Llr9lMP0u/347bYBjbTGH8b3l M2B8wFOhxrij5d7ztUB2q5XQpzEo6BnFDGwgAL071TVSvpW7mQ/yzZGTiYIDh/bzu5aX Azrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ZJYdODU3wiLWDtYGGvI8tT8GVp8sktVt/9zuVN5SknQ=; fh=AcJnZM6EDytUyPUVCJI0y2khmQG+DTcsePnjw1ZZqwg=; b=jMn4rMlkXo67+cMafGA93iwU2xdQrJdCs37/owmCrlrvgrxY8CB8yzTeF/KvzVSbgV FLw2mxN0AzILyrAcIbzjB4f4q3pRwuYqFqwilqOjc7O/FkSCAAX6yu3BczLYW0enzEj2 +ua6no4Aytl6ql3hCBBcJC52uXb69rMtDaCPZz5vPnatWUi+P93OZ1G0xvB3snxsVF2A zXKo/pdwrJX+CEjjkZaCfFW4MjH4AB500OYGemDNoTWUwiFlYeGuXITDOKoigN0I3NTZ MDKgD5FQeH3xTSCY7v2WlR/x3nFgeim3V9fLkcwgDahLQ1DNWwGlKbWvZRaRglS8Gm1C 11Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c7jZh31g; spf=pass (google.com: domain of linux-kernel+bounces-22133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22133-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t16-20020a639550000000b005c6607044easi3604443pgn.738.2024.01.10.03.52.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 03:52:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c7jZh31g; spf=pass (google.com: domain of linux-kernel+bounces-22133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22133-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 04EA22811B5 for ; Wed, 10 Jan 2024 11:52:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 384DD4A9B3; Wed, 10 Jan 2024 11:46:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="c7jZh31g" 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 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: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 Since an empty string is a valid cpulist, this cmdline option does not trigger any warnings: isolcpus=domain, 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 --- 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, unsigned long flags) } 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= or isolcpus= incorrect CPU range\n"); goto free_non_housekeeping_mask; } -- 2.43.0