From patchwork Tue May 28 00:56:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13675973 Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD7452907; Tue, 28 May 2024 00:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857814; cv=none; b=jgBzKwVEgaVQomkRri6CvwgZMkshMYdAPpvBzuHggOL828NkKcr2CqSj4XFUy6z7eOEmV2zoXIE+lMzml98WKzXnB7YEm+ZOOEsuhCAU5u4xUPE9nOSykEJjbPUfiS8/+Qf+JOyWvl79E8PmJ6eF7upu/cFxnp68LBRHkL4Pye8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857814; c=relaxed/simple; bh=yi/EszHUlOpCwgzZqVjrzflrzIMfLJP7BNBpSEMhkYY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z98i+bPxtTdKfTU/6O5Zu8Q89i6eQ1V6bnXAjale1s4hEXHs2GzprAKQUGsJx9IEsC1ZuCaUxg6FL01cGLRDp2Xr0u2TJ4AxxlIXUU9QIkMl+6EtE5LCooPeNRLSbX5O7YHEjS23RTAeVAb+Nl0vIKOdu6mr8Q3j3ha1auBEVWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KzuW6M0b; arc=none smtp.client-ip=209.85.128.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KzuW6M0b" Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-62a08099115so2935007b3.0; Mon, 27 May 2024 17:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716857812; x=1717462612; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WrtpjA7rbTF+FvnXXEAEsUdT24L7/cDqcK77C2g3SmA=; b=KzuW6M0bN9Np5HtDKb2U6OWQ5/5ovDW5k4dlOPLvJGibUEtg8l5wvWIyanvQ/+gMaP 8kLEy0KaKoFoG4fhBM4TaiuXT2JPDqtJ5qhtFVBCePFRgydWF2Sn6Z+bgvshBiAvMtY3 M5KzszTIh43wbWzT2tJOj7MF9xHrCCNN3RyK2WseUZiGcZwdfgQCQWsUkbX+2Cyav3NI AZMkibY+xC01TL7JXG8OwhVXmvn3TYgMROZ+c/e+9IVTz27MM+4DUR1uYCTpfqEWiHtz VWMebhWA7KdJrLFLzTsP2RBcvO57RxTvcgmU0NNKccZLX3mQr6X/vEJdAa8z7/lzBjtE TF5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716857812; x=1717462612; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WrtpjA7rbTF+FvnXXEAEsUdT24L7/cDqcK77C2g3SmA=; b=d2RAeHJH7t91x50XvkMPXG+a94REGYrF+8zRvthkBEqfaCJjlw4qxdASTV7RtzC0i9 hE79ZGEka2cQVK1tMdNqP5pTm/hzUW4HqasW7AVTmFjgw/r/7WQpDtNWJFbXgkgA8sA9 ZXpo274F2ArVbvm/lUju+OCE9OyWtyUv7OTbbyXwhxnaUxk9E/ltFeLHLGoutcK9w6s/ 5rslk/Q9meXH+F7skue3dZSOQEzYCxTxHqC59IP/kqZHcr0UMqmazoOCh74vG/NJ1pos z9SgHJnoDWFfyDRKIr4G5CnvO1XkxsZyZk2SHdpWBQ7BXvch/xWUPuAZd5t+XquIETMC MTSw== X-Forwarded-Encrypted: i=1; AJvYcCWs+gq9rkaxe5lC8vJIGGIFrWquV9rnkkrRUA1QwG7v3RfiXkc7Ekl+MtuzzOg4nOVS2UF6SgfZn3j83pVzfEanT1nfzXnOqfp95JANVIubCkwWRfcFO804zNNbfv9wmLZLpqMxUPzrDJn3tvFX865WLA0X3FkiqhP3wXx9ipChYA== X-Gm-Message-State: AOJu0YyBr2INXl3OCTuXKcVLSpkv77Mo070rhca+Cyb44J3KNxhLBuAf h2yU9SSRDX000ifX19e/u+05TsJrRLnVkfs/roDzMJ0GBDNHSyolP/gpLw== X-Google-Smtp-Source: AGHT+IF6oojh7SVjXJ8sdTcrbsy+EFZrvDSMwjEXLGSGTF684UQ1adnnZZP0XdnvzUZCDMb9dLHmcw== X-Received: by 2002:a81:6d12:0:b0:618:9353:100c with SMTP id 00721157ae682-62a479dc17amr20084727b3.23.1716857811724; Mon, 27 May 2024 17:56:51 -0700 (PDT) Received: from localhost ([2601:344:8301:57f0:35f3:16c3:302:8fdb]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a27d13bsm18412197b3.12.2024.05.27.17.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 17:56:51 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Yury Norov , "Paul E. McKenney" , "Rafael J. Wysocki" , Amit Daniel Kachhap , Andrew Morton , Anna-Maria Behnsen , Christoph Lameter , Daniel Lezcano , Dennis Zhou , Frederic Weisbecker , Johannes Weiner , Juri Lelli , Kees Cook , Mathieu Desnoyers , Peter Zijlstra , Rasmus Villemoes , Tejun Heo , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Viresh Kumar , Zefan Li Subject: [PATCH 1/6] MAINTAINERS: add linux/nodemask_types.h to BITMAP API Date: Mon, 27 May 2024 17:56:43 -0700 Message-Id: <20240528005648.182376-2-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240528005648.182376-1-yury.norov@gmail.com> References: <20240528005648.182376-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit bea32141764b ("nodemask: Split out include/linux/nodemask_types.h") added the nodemask_types.h but didn't cover it with corresponding record in the MAINTAINERS file. Signed-off-by: Yury Norov --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index d6c90161c7bf..6ae73aaee305 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3733,6 +3733,7 @@ F: include/linux/bits.h F: include/linux/cpumask.h F: include/linux/find.h F: include/linux/nodemask.h +F: include/linux/nodemask_types.h F: include/vdso/bits.h F: lib/bitmap-str.c F: lib/bitmap.c From patchwork Tue May 28 00:56:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13675974 Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 460E38F6B; Tue, 28 May 2024 00:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857815; cv=none; b=XECxNl00HlGHjrsvzzYoSchsb1PBW+n8A7H8cNTMXSaSdFmpoGzYyRa0NGJLv241d0g1mX3TCRygj1CVrMnl27Pe/IW+sHKVBxQfoiZHTwFuQ//zBdG+fsqn8ul6ywydXuCcr0Oe3TupiiOIJbj8EeIfN0O78IHp4Cg5bEYSp8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857815; c=relaxed/simple; bh=PvmXeWG0SnCHkNhBbrWqdrOlPRFIU9W0p/d1USU6NiM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hzADNJTcvSUa2UtrJ25Z2NyXfc2WaPpPKzCQ33LHb3GG9mC1dECHRUg31j3NzbFX7B4CBn1jA29FwucFs4SNvXFQHDMeoINAQn3lR4Xo1GBADezn1+sp2474cgFvmm5EyYhzzEnjUIK9HnJj8BkLFd+ys0Pi6MlRXtT6E7CRwwc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mQC+Y/9t; arc=none smtp.client-ip=209.85.128.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mQC+Y/9t" Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-627ea4e0becso2772557b3.0; Mon, 27 May 2024 17:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716857813; x=1717462613; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2i8ZBq63RXzGfHsgGbqgssORCMraFAb6HrAbhKbhoNE=; b=mQC+Y/9t4slyyfMRGcpahrhiiqWMRBwRTIRqDUgSmttHxON8w4owtDN8FV8g8r1PyY QU2bwNKZy+0PFaV50eHbj4stf7A/CIkjoEiDnoeKkU2Iga1k0DdeVBtH3GrdMC7QFCBu +ntJrKZBOySHGflauUkOVwtf12VTnUMSaVQU2qfVQVakT+UC39IeQc3zl8fzEJPaEPhV OToa+tDWZQfHNlqRHzxxCOhGrJ/w1kuxwkVpZZq1GqAMwjC6ZnJaC2WAPwRfN5mlQM/P oJVXU406VoX+uLP5+CrQWZ7PwhtB7NVPGhGztFh+F6l4lmdvQigWXnf6nfEhEs3OAWq/ HXHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716857813; x=1717462613; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2i8ZBq63RXzGfHsgGbqgssORCMraFAb6HrAbhKbhoNE=; b=Wh8SC/iPfgkLiWOGgD+kCFFKSA/eb24JEMHrMpq0ggEWuzCNaoV3zcPkQg262r9sQa VcmVi+W0tCU1SoiwF+pShy2RjliLyKi31XINQ7cHpvWIl3wB2P2L2fMs6AbbN0lQegZ2 ra/Olz1DNYPJhMxPq6CH2B8Xegb5PhHQCtfZqAMH/DqhXA2nhTKIcYo105aaD3bDoqyN h+Ixqcu80/B8AuNGNv4CmASrlB6qLFBmZVt4SOomHQkmgfGe7XIiGzvZ1iJAuSMRU8n1 nzxdYAXwgnqEHzSK41OIgxth9iugYrr0kaRljXWGNkZnoiJ4S1cz/oiAz6jvA96xhyZi 2nNw== X-Forwarded-Encrypted: i=1; AJvYcCUndcLVEv0xHZywTup8TcO8NwAtD7JZkwlGNtbqAgfXZfgXAYCuIeQUgthN5o+8XrzSQZog47AZVyhDSRz+y1bF2Ttbv0N3EptqwuzziMJejFA5vjb0SocrW77tQ2nKq3lwY7ghHreAZUwBlgui7xJzy1JV6UFNPsC/DZxd9eWgGA== X-Gm-Message-State: AOJu0YzO4nBflnsAMpyrDB50aQW7b3b4dPwp4pnga28uxoUIVRBMOaQ2 11/Z2r9j3Syp5s3/3pU3c4gqY9YVEKbD4LIzcyB9CeW9B/Z4HRwTFalDCQ== X-Google-Smtp-Source: AGHT+IGanwN5puLfVgJdTwaNaX0ZijOyB3yt9T1U0vsxt/p9RAMkPTjCsnwW8VBWu9iPsjNHvtaDqQ== X-Received: by 2002:a0d:d954:0:b0:61a:999f:e499 with SMTP id 00721157ae682-62a08da8ef8mr105496297b3.22.1716857813196; Mon, 27 May 2024 17:56:53 -0700 (PDT) Received: from localhost ([2601:344:8301:57f0:35f3:16c3:302:8fdb]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a5345b1sm18328627b3.120.2024.05.27.17.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 17:56:52 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Yury Norov , "Paul E. McKenney" , "Rafael J. Wysocki" , Amit Daniel Kachhap , Andrew Morton , Anna-Maria Behnsen , Christoph Lameter , Daniel Lezcano , Dennis Zhou , Frederic Weisbecker , Johannes Weiner , Juri Lelli , Kees Cook , Mathieu Desnoyers , Peter Zijlstra , Rasmus Villemoes , Tejun Heo , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Viresh Kumar , Zefan Li Subject: [PATCH 2/6] sched: avoid using ilog2() in sched.h Date: Mon, 27 May 2024 17:56:44 -0700 Message-Id: <20240528005648.182376-3-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240528005648.182376-1-yury.norov@gmail.com> References: <20240528005648.182376-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 indirectly via cpumask.h path includes the ilog2.h header to calculate ilog2(TASK_REPORT_MAX). The following patches drops sched.h dependency on cpumask.h, and to have a successful build, the header has to be included explicitly. sched.h is a frequently included header, and it's better to keep the dependency list as small as possible. So, instead of including ilog2.h for a single BUILD_BUG_ON() check, the same check may be implemented by taking exponent of the other part of equation. Signed-off-by: Yury Norov --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 61591ac6eab6..98abb07de149 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1604,7 +1604,7 @@ static inline char task_index_to_char(unsigned int state) { static const char state_char[] = "RSDTtXZPI"; - BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1); + BUILD_BUG_ON(TASK_REPORT_MAX * 2 != 1 << (sizeof(state_char) - 1)); return state_char[state]; } From patchwork Tue May 28 00:56:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13675975 Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7173F9DA; Tue, 28 May 2024 00:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857817; cv=none; b=ks/13UClbELNVDAT7v0k/CRcdbSGBJgzPm1xShf1nWy49qeMez1pZryLEGfhrBZhLswy7t82u4Qsq+lPSNbKwfskVP5Eq9iE/RCsvmCA8uQbKKNklfjfyk9jOmbRBgKRXETEJUClcCO/+OElpokHJGR/MvK30HDUorJaAsYOpCs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857817; c=relaxed/simple; bh=7qVS8UMxVpau1VYoGwb9XSPupJnuEqyN9rb8Est3678=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=J9GfUjKnd1aB9eI1sh216fEIvfey3l0YfLmAZ0ryAWLZeG9KwP9R6zJ7mNXEMlmOUA5lfe4FuKPx9/Nlacj4MgmAQy6n6lDfDnH6lP7t1HtQPUjz4QpJCkOCB5NIYn+AGqGAbyK6xsREY+0TAacv1t1J5RbhDu4ubh3uUtFbj5w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=H9xJIXQY; arc=none smtp.client-ip=209.85.128.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H9xJIXQY" Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-62a0894f1d3so23278077b3.1; Mon, 27 May 2024 17:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716857815; x=1717462615; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CnYdPTK2hjdSIrEV7sBehdeTDvZ879lf0pp/n//Br14=; b=H9xJIXQYrS4535eHlqyht8GiXHWGuIwjWTFnKps2FS2fnYoaSMteRIwXUkVe3/upIp Kxw1ua11A7KgJ5cAX42yIXarjYDL8yb28XlAI/MqVZqKGJM5mOMsVxWqkrE4vBy8KJiK ijbddo3sNRSH0+ZM6UFRQ5yXO4h+VXWdkhozC9mL0TDVlwxTYmNfIs9TM3gth82FHMKk W9wwjKGv1uLoEuVbEPT7dDHFLAuIm6PaLlmSQkCy0oK7MndwOhN5CNsnfw6QGMPYY6op uoaudecc/9ESZAXoIQgwF7vlPU/Xj1KzXfvcMnrmtpB1Y1aFrVPDEOGKCiDTR7uLcxzc Z/nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716857815; x=1717462615; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CnYdPTK2hjdSIrEV7sBehdeTDvZ879lf0pp/n//Br14=; b=UtyL6l/SuKCYunCFSfpeZW610E5UTJpf8CCbMfAeY3lT72Hv27kbepb5knlCwB4N4p 0g8bXcdMD/GrRgE5S730Zl++ZF6vubtRyA+z1kZikfKwTyqHpS6uv/2i0bfqIwUY0+A2 UmdRhjPcD8Z0bkJLsg4eQn7s3thN/kOyTf+Y7dxJkGC/X82i3Xqa/EIlTKJATRB4XFbj Pd8Kn9fYDdmtYSSszFuJVIyF1RkQ5RIMVKnrASrEdRmcWrE1DNvI63EkoBnl9OLfNkIB Zh5TFtt10gJfZlCiYYd3RqM4dT59F28oSW6y5jwscCMx1bR7mhhBr/QLeUqCn/3W5sq9 HwJg== X-Forwarded-Encrypted: i=1; AJvYcCXOkYEkakeG6Fo/WpS7sOpznOPc2x3se9gK8WbKcuqfhsH1UlTYfGw3hK0Z+04FTSFv757ZImpaP/SyN5EsiEPYW87K2omYRZwVlSocZdv4NGBtLYkMBMFa5lNU8YrESVCoJBTnqtMrMyOzNI2Nvax18DS2GZCC5kxzMy5n2DUQJQ== X-Gm-Message-State: AOJu0YwzVDuKsZeU0yWe1bjgrVdgaKmIg4grzdh4JkcpSJ2lOkIW5Pew l70SEqTmnXuvjXP46u5GckEm35PyTSRL3bFBV9ff7P1drrR3ufPYvrz0uw== X-Google-Smtp-Source: AGHT+IGFLMTRC6NGdZAsWBDoDAamZt9sH7ju82xLanpo1xta++q9GRm1I/nDECPhqHpvKBSqNyQYiA== X-Received: by 2002:a05:690c:c99:b0:618:88d1:f15f with SMTP id 00721157ae682-627fb1ca4c5mr105218897b3.0.1716857814398; Mon, 27 May 2024 17:56:54 -0700 (PDT) Received: from localhost ([2601:344:8301:57f0:35f3:16c3:302:8fdb]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a52eb60sm18506167b3.112.2024.05.27.17.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 17:56:54 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Yury Norov , "Paul E. McKenney" , "Rafael J. Wysocki" , Amit Daniel Kachhap , Andrew Morton , Anna-Maria Behnsen , Christoph Lameter , Daniel Lezcano , Dennis Zhou , Frederic Weisbecker , Johannes Weiner , Juri Lelli , Kees Cook , Mathieu Desnoyers , Peter Zijlstra , Rasmus Villemoes , Tejun Heo , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Viresh Kumar , Zefan Li , Yury Norov Subject: [PATCH 3/6] cpumask: split out include/linux/cpumask_types.h Date: Mon, 27 May 2024 17:56:45 -0700 Message-Id: <20240528005648.182376-4-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240528005648.182376-1-yury.norov@gmail.com> References: <20240528005648.182376-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Yury Norov Many core headers, like sched.h, include cpumask.h mostly for struct cpumask and cpumask_var_t. Those are frequently used headers and shouldn't pull more than the bare minimum. Signed-off-by: Yury Norov --- MAINTAINERS | 1 + include/linux/cpumask.h | 56 +---------------------------- include/linux/cpumask_types.h | 66 +++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 55 deletions(-) create mode 100644 include/linux/cpumask_types.h diff --git a/MAINTAINERS b/MAINTAINERS index 6ae73aaee305..c4fa8f264156 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3731,6 +3731,7 @@ F: include/linux/bitmap-str.h F: include/linux/bitmap.h F: include/linux/bits.h F: include/linux/cpumask.h +F: include/linux/cpumask_types.h F: include/linux/find.h F: include/linux/nodemask.h F: include/linux/nodemask_types.h diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 18410acdbc9e..79262a9ef03b 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -9,25 +9,13 @@ */ #include #include -#include #include +#include #include #include #include #include -/* Don't assign or return these: may not be this big! */ -typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; - -/** - * cpumask_bits - get the bits in a cpumask - * @maskp: the struct cpumask * - * - * You should only assume nr_cpu_ids bits of this mask are valid. This is - * a macro so it's const-correct. - */ -#define cpumask_bits(maskp) ((maskp)->bits) - /** * cpumask_pr_args - printf args to output a cpumask * @maskp: cpumask to be printed @@ -922,48 +910,7 @@ static inline unsigned int cpumask_size(void) return bitmap_size(large_cpumask_bits); } -/* - * cpumask_var_t: struct cpumask for stack usage. - * - * Oh, the wicked games we play! In order to make kernel coding a - * little more difficult, we typedef cpumask_var_t to an array or a - * pointer: doing &mask on an array is a noop, so it still works. - * - * i.e. - * cpumask_var_t tmpmask; - * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL)) - * return -ENOMEM; - * - * ... use 'tmpmask' like a normal struct cpumask * ... - * - * free_cpumask_var(tmpmask); - * - * - * However, one notable exception is there. alloc_cpumask_var() allocates - * only nr_cpumask_bits bits (in the other hand, real cpumask_t always has - * NR_CPUS bits). Therefore you don't have to dereference cpumask_var_t. - * - * cpumask_var_t tmpmask; - * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL)) - * return -ENOMEM; - * - * var = *tmpmask; - * - * This code makes NR_CPUS length memcopy and brings to a memory corruption. - * cpumask_copy() provide safe copy functionality. - * - * Note that there is another evil here: If you define a cpumask_var_t - * as a percpu variable then the way to obtain the address of the cpumask - * structure differently influences what this_cpu_* operation needs to be - * used. Please use this_cpu_cpumask_var_t in those cases. The direct use - * of this_cpu_ptr() or this_cpu_read() will lead to failures when the - * other type of cpumask_var_t implementation is configured. - * - * Please also note that __cpumask_var_read_mostly can be used to declare - * a cpumask_var_t variable itself (not its content) as read mostly. - */ #ifdef CONFIG_CPUMASK_OFFSTACK -typedef struct cpumask *cpumask_var_t; #define this_cpu_cpumask_var_ptr(x) this_cpu_read(x) #define __cpumask_var_read_mostly __read_mostly @@ -1010,7 +957,6 @@ static inline bool cpumask_available(cpumask_var_t mask) } #else -typedef struct cpumask cpumask_var_t[1]; #define this_cpu_cpumask_var_ptr(x) this_cpu_ptr(x) #define __cpumask_var_read_mostly diff --git a/include/linux/cpumask_types.h b/include/linux/cpumask_types.h new file mode 100644 index 000000000000..461ed1b6bcdb --- /dev/null +++ b/include/linux/cpumask_types.h @@ -0,0 +1,66 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_CPUMASK_TYPES_H +#define __LINUX_CPUMASK_TYPES_H + +#include +#include + +/* Don't assign or return these: may not be this big! */ +typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; + +/** + * cpumask_bits - get the bits in a cpumask + * @maskp: the struct cpumask * + * + * You should only assume nr_cpu_ids bits of this mask are valid. This is + * a macro so it's const-correct. + */ +#define cpumask_bits(maskp) ((maskp)->bits) + +/* + * cpumask_var_t: struct cpumask for stack usage. + * + * Oh, the wicked games we play! In order to make kernel coding a + * little more difficult, we typedef cpumask_var_t to an array or a + * pointer: doing &mask on an array is a noop, so it still works. + * + * i.e. + * cpumask_var_t tmpmask; + * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL)) + * return -ENOMEM; + * + * ... use 'tmpmask' like a normal struct cpumask * ... + * + * free_cpumask_var(tmpmask); + * + * + * However, one notable exception is there. alloc_cpumask_var() allocates + * only nr_cpumask_bits bits (in the other hand, real cpumask_t always has + * NR_CPUS bits). Therefore you don't have to dereference cpumask_var_t. + * + * cpumask_var_t tmpmask; + * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL)) + * return -ENOMEM; + * + * var = *tmpmask; + * + * This code makes NR_CPUS length memcopy and brings to a memory corruption. + * cpumask_copy() provide safe copy functionality. + * + * Note that there is another evil here: If you define a cpumask_var_t + * as a percpu variable then the way to obtain the address of the cpumask + * structure differently influences what this_cpu_* operation needs to be + * used. Please use this_cpu_cpumask_var_t in those cases. The direct use + * of this_cpu_ptr() or this_cpu_read() will lead to failures when the + * other type of cpumask_var_t implementation is configured. + * + * Please also note that __cpumask_var_read_mostly can be used to declare + * a cpumask_var_t variable itself (not its content) as read mostly. + */ +#ifdef CONFIG_CPUMASK_OFFSTACK +typedef struct cpumask *cpumask_var_t; +#else +typedef struct cpumask cpumask_var_t[1]; +#endif /* CONFIG_CPUMASK_OFFSTACK */ + +#endif /* __LINUX_CPUMASK_TYPES_H */ From patchwork Tue May 28 00:56:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13675976 Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8368D13FEE; Tue, 28 May 2024 00:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857817; cv=none; b=sgSMirTudUBxRD0Y3as0LUX98JFFEsH+lhsiEWDOHvJNuJlqz+Pw3bvvs3j3ftjAOi3+zsdSUIYqGLnlPJ8S+M5pRUiBGz4vyUwbYI6pemaTf90ddDtCohINmH76SHy3YNJnMTWke45vnKwUwkVHC+8jqYAwcp9uA7OIMKQxQKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857817; c=relaxed/simple; bh=GtclWTy0ASRdAy3fBHQ5+Eg7GjfSLLlKIztDtP6lJnc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qGhw3H2N/YCbXsjmJW8f4xlzv2Ptx+7/zcugc2YWKl9GPTOwYzdC7SHLGqjJJgtdeIBII8v0mN7d0tQC5ULiptaJ/jNFXYBSgNq9x5rtaCdUjL/KhxvJxBM1c0YBByWCzKe2H9XhfmesDKGCfZk13hOSf5lnpxn4G6wuS/qMK7w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XzMXiKjs; arc=none smtp.client-ip=209.85.128.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XzMXiKjs" Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-627ebbe7720so2391647b3.0; Mon, 27 May 2024 17:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716857815; x=1717462615; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XKPhButNX8xjaR4Wjw1GyI4VB8TnS9vBdoFs31kcATQ=; b=XzMXiKjs/sd5joDlv+Jz2ejVs/1QPbnGCWbrUPSWnxDfZHMjqh7orYvZRVCgQOSqsn SrpjVdF0C5YPQ26AbuFJGn2OSrGMu3Sjuh5QbcdR+EEQTuG9PAlpKPak2PThmsiiKUkW cpPo275UawTg9z5IUigkk08bQyDe/vJXp7crFRZUsXaKhQTcg/XU1dClaNczPH5iJbt7 cqPxtU0YOdIWVzyWQ+OAbu6NRPgDyW7uD2JvaxrXsRc33vl0DuYfRKHaY9BEGKYvr9YQ FxLJnDwJ068sAVpaGl9j0KYpgenGd1niPPyILP9zkuwUvzykvQl4aoMwEaTi1yroDQW0 g8lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716857815; x=1717462615; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XKPhButNX8xjaR4Wjw1GyI4VB8TnS9vBdoFs31kcATQ=; b=tMIjfVPC6+bBC4QSJNnuY5Fzx30m5Zo/RCdvQgiWFS3M3fGnuhBb0m0hrl6QKb/rfk 5Jz/71kHXPnO4OqVCnnNmGemg5xqFpuNYUjAZECAgLmcS836/QJQI0mJvBvMBxZRQexb chpoxw9s60MRVJ2aMMXGgPvd/AsobqNuuZvHjv/Q16khfFtKxk0phQrFZjWpHbNn7f1D Lp93hETqYvPGB7mSQhG7Ld3dckkR16MXzZwO0fBPhOm4rQr1LNAwxJCQZmIWtu974h6K dSVQ0pWpx3Ua4qpFr4HtQGBi59oYQ4THvbqMab+pt+1qx+zbsnXElquDt5KjNsI1IDLz TNwQ== X-Forwarded-Encrypted: i=1; AJvYcCUl3unwSWP5T1KpnaytybtsKVw987TJRSPu+PeoDRo0OpNLXhGsOHgUbmVYUYZtrT5aqAJiEMJlzqKsDDJ/E7vzJRcVzjUGauqHxgJ42Bo8zKOPDVF8Z61xgkR9Y05l7UiLMLTkhJmwnrjC0PH35DcAYTPIfrBn9JH8XwdndbIEgw== X-Gm-Message-State: AOJu0YwzppLrp2snMCZSo4adelAfgcUGK7sj+0gJ9N6SZAp7d+ag4ES5 be/rP9+CbDeuKFdOx9Um8+c2/e8I/2km2SzWyo3YeA0/8OUveMHcCFuXlA== X-Google-Smtp-Source: AGHT+IFe5hc0HMbIYKV8GGca2K7UFivtrv6cj+FsXeO4rccoRk4EjlKGQ1bt+Bu1VPRdc4g49tpZhw== X-Received: by 2002:a0d:dfc9:0:b0:61b:3346:83ce with SMTP id 00721157ae682-62a08d83a1bmr114507497b3.15.1716857815579; Mon, 27 May 2024 17:56:55 -0700 (PDT) Received: from localhost ([2601:344:8301:57f0:35f3:16c3:302:8fdb]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a534cf7sm18415697b3.115.2024.05.27.17.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 17:56:55 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Yury Norov , "Paul E. McKenney" , "Rafael J. Wysocki" , Amit Daniel Kachhap , Andrew Morton , Anna-Maria Behnsen , Christoph Lameter , Daniel Lezcano , Dennis Zhou , Frederic Weisbecker , Johannes Weiner , Juri Lelli , Kees Cook , Mathieu Desnoyers , Peter Zijlstra , Rasmus Villemoes , Tejun Heo , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Viresh Kumar , Zefan Li Subject: [PATCH 4/6] sched: drop sched.h dependency on cpumask Date: Mon, 27 May 2024 17:56:46 -0700 Message-Id: <20240528005648.182376-5-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240528005648.182376-1-yury.norov@gmail.com> References: <20240528005648.182376-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 sched.h needs cpumask.h mostly for types declaration. Now that we have cpumask_types.h, which is a significantly smaller header, we can rely on it. The only exception is UP stub for set_cpus_allowed_ptr(). The function needs to test bit #0 in a @new_mask, which can be trivially opencoded. Signed-off-by: Yury Norov --- include/linux/sched.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 98abb07de149..f2f907ef1389 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -1778,7 +1778,8 @@ static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpuma } static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) { - if (!cpumask_test_cpu(0, new_mask)) + /* Opencoded cpumask_test_cpu(0, new_mask) to avoid dependency on cpumask.h */ + if ((*cpumask_bits(new_mask) & 1) == 0) return -EINVAL; return 0; } From patchwork Tue May 28 00:56:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13675977 Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E012B17C6A; Tue, 28 May 2024 00:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857819; cv=none; b=uR+OG2xJWrYiB9qPfy0qk+mXHuU3j4I9hAgt3NjZgyTMAzHzpauZXONImIoPeCPbmSRWSY8st/Tjk9QINUc6YvPk8x6qI3efbM9eKBtiJi+BZ4LVIimMyJfcCLF0/m8KQAl4d551D+9HU7BhUlxVhDVUaL1uoDfUhMTkSDmY33A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857819; c=relaxed/simple; bh=XviXIO66hJ4gYGo+wTqmxQ6eYLtqNAT+9ea+NoAhLJM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SEgcHXvBID6LkGETY4wei+56AGbB5nlH7XqfJPN7Y55gts9pjC+0x11e+9PhijTlFvr1y5IXCThxgKxZkPj5+7J1y1fMOMFmKA6GulUauBjjbhI1DEM/zSnPhsGZ+On8EieJ8DHNeUu9T+Jk1XTOWJy73xW6sO4a7S3YWcjSpmA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mBtBabPw; arc=none smtp.client-ip=209.85.128.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mBtBabPw" Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-62a0849f5a8so2825347b3.2; Mon, 27 May 2024 17:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716857817; x=1717462617; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qHGYk8qXYj5JTpHSzZERaVZ+nE3cg/cmKUns2Hgwu4w=; b=mBtBabPwcHHow5qM7+rnmnXOuGMct9bPRB7oHcQwn6bkhKR8cQYZkLRbRAASSdAdIp LDn6eE0fmtU7Xpbhk01KfObx+NNOnMMIa9f50AFdU5qGq8IztjdzzKI4FTCjaXYbXbDH new4zXe1p/FRUML1Hu77YsONaBlCNEWueSvOeu0QafxuRb/g8z7g10/kF7C831hC6P/V BI9476ZmNLrT0ifMrNtP5Ut0oVxhqo9oHcdhP0S808Cp9dyRRNVKHf74VDWT7Ys+CRfW FCA9hiPbyiiLcM9os1z140eeJNacfSMi7LVrmUebkrbAw3aERV170an6+dTedjFe2urX V67w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716857817; x=1717462617; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qHGYk8qXYj5JTpHSzZERaVZ+nE3cg/cmKUns2Hgwu4w=; b=pDQ4VLf7Zf2VReTBj6q73lWSKtL6g8KRCAsgicjWSJvJcxJGwdp/py2onbrvxXcdj3 xn4na4Cp4ez1i8GGzCrwwyS9fC4nXvF1gdghyv8yOX3QAM3DhKBuFVfYli0Amm9cU5fc vj+HK6ftvAyxIeX86VnQB2IF0modVAxTIu7F/6EBOrs6ZoBlDzYF1hRrjMHSju14bmt5 DM4mWRHycI7VZYfgM5eC6y46dThK5aSiucDb7vAc0hf8siT+xktmqxUzS2OW5fgr74tx vqHNE37XZcIsZCrnLfOOyVdCcoE322V6a+z43wASypneTz9YEHdBP+BSSwBw4Jng/yoE LgMA== X-Forwarded-Encrypted: i=1; AJvYcCUqBgd7m1RQlRMiUU2K6cQntA+F1ofruY7LRotfZOn61nn6+KVsozmQRqj3YeTbF78aaY/xMl0IsN9wix/OOcumvz4V5m25lMqKo9GJhDNPZbaB3ChqBM60DyyLYbJoWv4NvQBIF8ugIy7xFW1c7Ia2LrTIueau1czAZykDJDIV/A== X-Gm-Message-State: AOJu0YyJMuxevMiJZ2zFrqW3WMjhKcWxsGNOniXUrx8GS0WCMPlxuGNk 1I5HLkQJofUSjmhnOA/UI7E2KmoLebOuuokkj0fzt+f7hOLcNR5zLxhUMQ== X-Google-Smtp-Source: AGHT+IFQ1Cdt/C4ONuJ8/TbLF7uijtI1itlxg7F6r+jPWRUhsZaJ+tjQCHNvVKklYdjZsrys0pVIkA== X-Received: by 2002:a81:a052:0:b0:627:dfbd:89f with SMTP id 00721157ae682-62a08d291b9mr102632737b3.6.1716857816951; Mon, 27 May 2024 17:56:56 -0700 (PDT) Received: from localhost ([2601:344:8301:57f0:35f3:16c3:302:8fdb]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a4f0205sm18118607b3.84.2024.05.27.17.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 17:56:56 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Yury Norov , "Paul E. McKenney" , "Rafael J. Wysocki" , Amit Daniel Kachhap , Andrew Morton , Anna-Maria Behnsen , Christoph Lameter , Daniel Lezcano , Dennis Zhou , Frederic Weisbecker , Johannes Weiner , Juri Lelli , Kees Cook , Mathieu Desnoyers , Peter Zijlstra , Rasmus Villemoes , Tejun Heo , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Viresh Kumar , Zefan Li Subject: [PATCH 5/6] cpumask: cleanup core headers inclusion Date: Mon, 27 May 2024 17:56:47 -0700 Message-Id: <20240528005648.182376-6-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240528005648.182376-1-yury.norov@gmail.com> References: <20240528005648.182376-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Many core headers include cpumask.h for nothing. Drop it. Signed-off-by: Yury Norov --- include/linux/cgroup.h | 1 - include/linux/cpu.h | 1 - include/linux/cpu_cooling.h | 1 - include/linux/kernel_stat.h | 1 - include/linux/node.h | 1 - include/linux/percpu.h | 1 - include/linux/profile.h | 1 - include/linux/rcupdate.h | 1 - include/linux/seq_file.h | 1 - include/linux/tracepoint.h | 1 - 10 files changed, 10 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 2150ca60394b..c60ba0ab1462 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 861c3bfc5f17..ea6ac8f98e4a 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index a3bdc8a98f2c..2c774fb3c091 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -15,7 +15,6 @@ #include #include -#include struct cpufreq_policy; diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 9c042c6384bb..b97ce2df376f 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/node.h b/include/linux/node.h index dfc004e4bee7..9a881c2208b3 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -16,7 +16,6 @@ #define _LINUX_NODE_H_ #include -#include #include /** diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 03053de557cf..4b2047b78b67 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/profile.h b/include/linux/profile.h index 04ae5ebcb637..2fb487f61d12 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h @@ -4,7 +4,6 @@ #include #include -#include #include #include diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index dfd2399f2cde..fb8ab4618d63 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 8bd4fda6e027..2fb266ea69fa 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 689b6d71590e..6be396bb4297 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include From patchwork Tue May 28 00:56:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13675978 Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E0651BC4B; Tue, 28 May 2024 00:56:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857820; cv=none; b=heOylbyrfzD+cZIyHV6LJQJq945vax/Q1QZFz2/5nwhGSwBPTHh5Oia6D+I0k1/dICBEbAA3A4K/OuL4flwZlt3awJgRIjOKFlRV9D71M2/mBEIm8yx6HeHnjCJZwnCvA/lonCTcjKEBnt7MKgtN3WanlaVecSmU9w2JyAOpALg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716857820; c=relaxed/simple; bh=sWIoYtsUMpM3ixzhSRVT07SQRSC0eL+p3JdrB0m3TyQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MqaD0oOj6LJkhvDHgADvqbjxPgi3LLUjmYlrsYU5CMoB8DZhJu9WLpgAvo2ydejBzg+vemLxCtKWFApYfaK4+97xSTWRaFpIYES0MfTEj2jahERyH1sBEq0x96oFd+rAjspHhOCxBzdt9NsG6I4OeF6gQddOrJATYwwr2hiixd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S8g0INEd; arc=none smtp.client-ip=209.85.128.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S8g0INEd" Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-62a0894f1d3so23278277b3.1; Mon, 27 May 2024 17:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716857818; x=1717462618; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+UsAL9kPP63kEGxLShGtp1xElrDmM28x7Y9xy2z/xj0=; b=S8g0INEdyz0scI3ChWNsSue2p/ArUZgMDOfvBUrPlcGjyR7Vs2oQST6BgylQ+BSfff qnil1lZcG5J4jo51nU9aNP2mlvXJeRNvBEKSV7vYIxZfRHkHAVVKLnll4QY5w0P4iAit FSANcbxqVrKUo1W/eV6NZG+3qV0pLGCtzozS+salCb6DiDYAdugT/Wxg6udu48nWWqHM izLL0wC3OIW8kXVVIr/xQHHuQyczz/v1TKA2rcn0DLfWeKb+e4W2ov39994+RRnP8S41 cS4uLsrKZ/j5uCsmm8+WcSOvchqgWeG4YWO4TpKsuIhDnDTSshpSsAeASl6UQQjdXUUI kSYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716857818; x=1717462618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+UsAL9kPP63kEGxLShGtp1xElrDmM28x7Y9xy2z/xj0=; b=sslYdfc5IbRJzSSxK1A61BbmU6Pwe8bcQa0Mal1uJnRYH/pc7+bV1AB0f1op2IKjcK G8i1RZoeiUlc8xnqd8PcvaNtwy9DBkr3utzY6Sl6TrMtsAjRhBjPq2yOgkVbbzoDJbya B8z5IthoAcI577FQNBHpiKWdhVqico8fC06ihDY5Fyk+4vA47FdvuSkrgOnTx/INJlsK M4DttMs7Y0rzJY3jh6AGuuHU46GFl0xCrI28VYCWK3eC1PVKRhXCM76efY8TSIc9k4rs fFp/wtf2JH3jGSBPUuju7DUsV2w1zXjRHr1VZR2iTRZ8+UKMUeTCIMA5hk26SREPbnhr IH/w== X-Forwarded-Encrypted: i=1; AJvYcCVvFbqaT2fyAnG084G2aji+fAjaOByyktf1AcD5G2UXezjb7W2v/SqPdFtZKepRNw9vPNoAbyOaQh9Bh+5HmPnRjcorTynycY0ZX29oVN8VyvDyrAe/TUsPkUWcuBH1bFjeRCv7HIJ3NP/oBB4OWgUl/0NGPf/ORByX3rHZIZlYZw== X-Gm-Message-State: AOJu0YwMlk5ozH0FlTQu5vY5ZSRgiU1obKUAmHKMC8MhXhfERhDR15io 5KLQoYUYVKxX/LIwUvb/zjW+JWIungfm7TrYEWC5+6sOYLogiViPXwLZ0w== X-Google-Smtp-Source: AGHT+IGmR0W63RWXP7J3rcUruY8CccOWbM2LLUmmQW5FfR5dztBstUyu6LsVEmByl5i5yf2pTBs2EQ== X-Received: by 2002:a05:690c:c99:b0:618:88d1:f15f with SMTP id 00721157ae682-627fb1ca4c5mr105219357b3.0.1716857818158; Mon, 27 May 2024 17:56:58 -0700 (PDT) Received: from localhost ([2601:344:8301:57f0:35f3:16c3:302:8fdb]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a3bf743sm18246387b3.40.2024.05.27.17.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 17:56:57 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, rcu@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Yury Norov , "Paul E. McKenney" , "Rafael J. Wysocki" , Amit Daniel Kachhap , Andrew Morton , Anna-Maria Behnsen , Christoph Lameter , Daniel Lezcano , Dennis Zhou , Frederic Weisbecker , Johannes Weiner , Juri Lelli , Kees Cook , Mathieu Desnoyers , Peter Zijlstra , Rasmus Villemoes , Tejun Heo , Thomas Gleixner , Ulf Hansson , Vincent Guittot , Viresh Kumar , Zefan Li Subject: [PATCH 6/6] cpumask: make core headers including cpumask_types.h where possible Date: Mon, 27 May 2024 17:56:48 -0700 Message-Id: <20240528005648.182376-7-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240528005648.182376-1-yury.norov@gmail.com> References: <20240528005648.182376-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Now that cpumask types are split out to a separate smaller header, many frequently included core headers may switch to using it. Signed-off-by: Yury Norov --- include/linux/cacheinfo.h | 2 +- include/linux/clockchips.h | 2 +- include/linux/cpu_rmap.h | 2 +- include/linux/interrupt.h | 2 +- include/linux/irqchip/irq-partition-percpu.h | 2 +- include/linux/msi.h | 2 +- include/linux/pm_domain.h | 2 +- include/linux/stop_machine.h | 2 +- include/linux/torture.h | 2 +- include/linux/workqueue.h | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h index 2cb15fe4fe12..286db104e054 100644 --- a/include/linux/cacheinfo.h +++ b/include/linux/cacheinfo.h @@ -3,7 +3,7 @@ #define _LINUX_CACHEINFO_H #include -#include +#include #include struct device_node; diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 9aac31d856f3..b0df28ddd394 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -12,7 +12,7 @@ #ifdef CONFIG_GENERIC_CLOCKEVENTS # include -# include +# include # include # include diff --git a/include/linux/cpu_rmap.h b/include/linux/cpu_rmap.h index cae324d10965..20b5729903d7 100644 --- a/include/linux/cpu_rmap.h +++ b/include/linux/cpu_rmap.h @@ -7,7 +7,7 @@ * Copyright 2011 Solarflare Communications Inc. */ -#include +#include #include #include #include diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5c9bdd3ffccc..da88261f4748 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/linux/irqchip/irq-partition-percpu.h b/include/linux/irqchip/irq-partition-percpu.h index 2f6ae7551748..b35ee22c278f 100644 --- a/include/linux/irqchip/irq-partition-percpu.h +++ b/include/linux/irqchip/irq-partition-percpu.h @@ -8,7 +8,7 @@ #define __LINUX_IRQCHIP_IRQ_PARTITION_PERCPU_H #include -#include +#include #include struct partition_affinity { diff --git a/include/linux/msi.h b/include/linux/msi.h index dc27cf3903d5..26588da88bdd 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -19,7 +19,7 @@ */ #include -#include +#include #include #include #include diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index f24546a3d3db..71e4f0fb8867 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include /* diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index ea7a74ea7389..3132262a404d 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h @@ -3,7 +3,7 @@ #define _LINUX_STOP_MACHINE #include -#include +#include #include #include diff --git a/include/linux/torture.h b/include/linux/torture.h index 1541454da03e..c2e979f82f8d 100644 --- a/include/linux/torture.h +++ b/include/linux/torture.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index fb3993894536..52496f07fba5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include