Message ID | 20240110114610.1941474-1-vschneid@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-22133-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp737192dyi; Wed, 10 Jan 2024 03:52:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbO3hBIrx22roHefPfJOjGMIyGE6dCRIA9tU1h48ZvKZG4wNBno/4J+XEx3gXEAtBBnWX8 X-Received: by 2002:a17:906:59:b0:a28:c8bd:2592 with SMTP id 25-20020a170906005900b00a28c8bd2592mr927292ejg.54.1704887559532; Wed, 10 Jan 2024 03:52:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704887559; cv=none; d=google.com; s=arc-20160816; b=0GQBUxzJrlAgGfZHgbHFJzLKq+j138CHppzk6iZ8QbFUMChZNa7VQyVjk3gx2zZFRS d9HEc5gJhDoLa84AqrfaAtaYqigbGuqdR20ie0FgAVLngJyyEA2IQ2LMtMI1HVWcDdKw nCvsr/Vj7vU6n7nXQ03P+lKCLT49AElQXrfGLSOZeqaC8T7qqTIANZC6mamYA+L+DPpV 0XWlJBJGasvefaMx24VJLx2zGVIrY0ZuHQ78MqvmVW+2M3R0JuwOmKzEh/gVjcpFUM9z 22YsY+p9Nxb8VSLSYBM5to3HKbPpiIvTdXYcjd56axVwkFksuk90FtmWQiEofGQmmZVA EebQ== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22133-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u16-20020a17090626d000b00a28c80e3888si1755760ejc.219.2024.01.10.03.52.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 03:52:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22133-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22133-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2A0621F2241F for <ouuuleilei@gmail.com>; Wed, 10 Jan 2024 11:52:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 216FA4B5A4; Wed, 10 Jan 2024 11:46:48 +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 <linux-kernel@vger.kernel.org>; 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 <vschneid@redhat.com> To: linux-kernel@vger.kernel.org Cc: Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Steven Rostedt <rostedt@goodmis.org>, Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>, Daniel Bristot de Oliveira <bristot@redhat.com>, Frederic Weisbecker <frederic@kernel.org> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787704177763761229 X-GMAIL-MSGID: 1787704177763761229 |
Series |
sched/isolation: Warn about missing isolcpus mask
|
|
Commit Message
Valentin Schneider
Jan. 10, 2024, 11:46 a.m. UTC
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 <vschneid@redhat.com>
---
kernel/sched/isolation.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Le Wed, Jan 10, 2024 at 12:46:10PM +0100, Valentin Schneider a écrit : > 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 <vschneid@redhat.com> Acked-by: Frederic Weisbecker <frederic@kernel.org>
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; }