From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 389B0C43334 for ; Wed, 6 Jul 2022 17:42:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A3616B0072; Wed, 6 Jul 2022 13:42:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0528C6B0073; Wed, 6 Jul 2022 13:42:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5C246B0074; Wed, 6 Jul 2022 13:42:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D6F2B6B0072 for ; Wed, 6 Jul 2022 13:42:57 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A7A9060C20 for ; Wed, 6 Jul 2022 17:42:57 +0000 (UTC) X-FDA: 79657395594.19.F12CF38 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by imf10.hostedemail.com (Postfix) with ESMTP id 4EC05C0012 for ; Wed, 6 Jul 2022 17:42:57 +0000 (UTC) Received: by mail-qt1-f170.google.com with SMTP id x1so19281573qtv.8 for ; Wed, 06 Jul 2022 10:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HRbOPX+WUhFrYKzoluCaxZY8LvvDK+k9pUsQcmDb/F4=; b=Pxoxj03ulPHDq4s/o3TDl5U4j+O7JiUekxDtdlCXDdGnjrsbJnMEZGTURMn861MU7e BQP60+I9xORkdZAwAYzG4TIX7IaP+Mfkvhi0ATpmszHnbJZMq2nKTPlM7VhuvEZO+66l s+uHKfOUcetPpF5ybi67JsxkLL2oztdS4Oldr13AxJlaT9ZHH9UYHbvQpZVxLwAGguki XCJA2QMrffL6IPiE3sbKQVu/jLDukYhiUhKk0yrE1Yi9QadotWeHxAEtBkhCe4tpR/qZ h3nmaPO//KzjDQEfn0QcdkCxFcWawqlTa2ZRWrYHNbt+kTclrt9Bq3PRCK0fLn+em/It +tfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HRbOPX+WUhFrYKzoluCaxZY8LvvDK+k9pUsQcmDb/F4=; b=ev7c7Wx+sHHLtMk6CcMYIQnq8k5jFjHxQUZ3Fy3rf7e0HdXrFkSiBPapsE/COETDjZ j4tofM0IiAje+BxpESZTIVLZRGvhm1VhFGG7rcl9VTt13rGfGQgy7XldVp6uNFIp/tC6 2lVwtQvn9RokhITbBA5jswi0Yx76VXbW1SRvYKPKY3Q2LhqFpmgBwuTW04+F4r2tQ24y DLJkYpgfdYrmiLtZqArwqb5Xf/k1sZ7ti157GWN8d3uvEScKEEWa2tEveZciYWvtJzbI jSSyIHe+PvEw8nkuY2t4jgrQ7OIa/E62Gq3nRJUpc+gnX81HAcR75/o+r+nQ7+fmHJU2 A3wQ== X-Gm-Message-State: AJIora9NbaN7GkmKEc+Ed9cjrsgpe5PLmYPZzdI/GkxttasN5M75nrkA yEvHZtnarVvJeF2GQlW76vY= X-Google-Smtp-Source: AGRyM1sYo9q4pC/HP6vE7tooa9UhswxdS7S6YLHmNuAfjoqgpdDE4ytFctniTnj4EBTjrzSoMj71LA== X-Received: by 2002:ac8:5a47:0:b0:31d:2388:48dc with SMTP id o7-20020ac85a47000000b0031d238848dcmr33826913qta.80.1657129376423; Wed, 06 Jul 2022 10:42:56 -0700 (PDT) Received: from localhost (c-69-254-185-160.hsd1.ar.comcast.net. [69.254.185.160]) by smtp.gmail.com with ESMTPSA id k1-20020a05620a414100b006af039ff090sm33393108qko.97.2022.07.06.10.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 10:42:56 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, Andrew Morton , Andy Shevchenko , David Howells , Ingo Molnar , Geert Uytterhoeven , Jonathan Corbet , "Kirill A . Shutemov" , Matthew Wilcox , NeilBrown , Rasmus Villemoes , Russell King , Vlastimil Babka , William Kucharski , linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org Cc: Yury Norov Subject: [PATCH v2 00/10] lib: cleanup bitmap-related headers Date: Wed, 6 Jul 2022 10:42:43 -0700 Message-Id: <20220706174253.4175492-1-yury.norov@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657129377; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=HRbOPX+WUhFrYKzoluCaxZY8LvvDK+k9pUsQcmDb/F4=; b=LLotNmMLVgFM1nNb8XvhZwG/nqwp+hOOXVpcTTQ3QsfgJ1ru6kj5RUcyoX8Rp16+sCdyCJ f7a8IEUZmiXdd2vfsekcyvOnZ8DJQMJGCpDrIvbPW81zWDQZH4XjxMgkMhkD80gQgkGZhC UZ5u8x/KRStRhcdHxxiBU78P20f+iJw= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Pxoxj03u; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf10.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.160.170 as permitted sender) smtp.mailfrom=yury.norov@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657129377; a=rsa-sha256; cv=none; b=oaRUNfm0BFKv4ibePBKU5NwGQ2EP0QRVjXn5tTlv9ETRiXMirPqAhcKZkQdeuIMgNkH5yl KosZzTS9vYoiLfQN8/8XT8ddwK4INlLr46DIdjkfxiNIDwuNkTY7xCHrvDRR5jpEpMfFCx fxiiOTyAAZzznm3px3BlBCQbs6cS1+8= X-Rspamd-Server: rspam11 X-Rspam-User: X-Stat-Signature: u1x9pau3pytnp8yw6ejsetsu811gxatc X-Rspamd-Queue-Id: 4EC05C0012 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Pxoxj03u; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf10.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.160.170 as permitted sender) smtp.mailfrom=yury.norov@gmail.com X-HE-Tag: 1657129377-114212 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This series unifies declarations of bitmap-related functions and aligns return types with values that actually returned. Also, it moves one-liner wrappers around cpumask functions into headers, so that compiler has a chance to optimize better. With this series, GCC 11.2 for ARM64 with kernel v5.19-rc4: add/remove: 15/7 grow/shrink: 461/164 up/down: 14844/-4580 (10264) This +10K didn't surprise me because modern compilers are more aggressive in inlining, loop unrolling, and other techniques that increase size of the image. v1: https://lore.kernel.org/linux-mm/YsAzU3g2QpgmIGre@smile.fi.intel.com/T/ v2: - Align whitespaces in headers; - Make bitmap_weight() unsigned long consistently; - Pick 2 patches from Ingo's sched/headers series [1] that split linux/gfp.h, and drop my similar patch for it. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/log/?h=sched/headers Ingo Molnar (2): headers/deps: mm: Optimize header dependencies headers/deps: mm: Split out of Yury Norov (8): arm: align find_bit declarations with generic kernel lib/bitmap: change return types to bool where appropriate lib/bitmap: change type of bitmap_weight to unsigned long cpumask: change return types to bool where appropriate lib/cpumask: change return types to unsigned where appropriate lib/cpumask: move trivial wrappers around find_bit to the header headers/deps: mm: align MANITAINERS and Docs with new gfp.h structure lib/cpumask: move some one-line wrappers to header file Documentation/core-api/mm-api.rst | 8 +- MAINTAINERS | 1 + arch/arm/include/asm/bitops.h | 18 +- include/linux/bitmap.h | 13 +- include/linux/cpumask.h | 125 +++++++++-- include/linux/gfp.h | 348 +----------------------------- include/linux/gfp_types.h | 348 ++++++++++++++++++++++++++++++ lib/bitmap.c | 9 +- lib/cpumask.c | 97 +-------- tools/include/linux/bitmap.h | 12 +- tools/lib/bitmap.c | 6 +- 11 files changed, 494 insertions(+), 491 deletions(-) create mode 100644 include/linux/gfp_types.h -- 2.34.1