Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp185438rdb; Thu, 1 Feb 2024 05:59:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAt+i1EkcBKtBJEx1h9L2ZSipEemoChcjy0oYxC7Lx1e23DAhmmmL6KUfdvYNBFuBW2QE6 X-Received: by 2002:a17:903:22ce:b0:1d9:3f85:29c0 with SMTP id y14-20020a17090322ce00b001d93f8529c0mr3626610plg.59.1706795962929; Thu, 01 Feb 2024 05:59:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706795962; cv=pass; d=google.com; s=arc-20160816; b=QsyRkUlrZIh4sR/scT00Jn3O/MeCXzV03MOMCgM9OJzohsphU6VIdLM1NKjb3HtzPJ qGS+qDI5qP9RlPlvcpMrcgmLaM8lukw0KAXo4LXHIcPaCpzshMg5ZLkcDBgOQfrVyvdZ JyMfL1KlSCRoS6BbUNdScTAHmibfDYUpaweHOT/Ynd80y8SUGwaAP+3ptt964Jk9r8nt 6Bqx6Fn7KsiGFpJ/447Qss3y6vAlZHSAKjMmsHEZg7iWRPZArm9dCuQGoOPHiLZPtuu1 uRYs+OfX8AjkvfpXe7rAbXQA8Nom95E6/a8HhtIYAjadcTHnJ+T6kpN7BDgsr2yWtjy+ KzhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=gYWYexFtoJ2yHocou+INVoUtLbF8tOuPvQoRlZwm2yg=; fh=IXuoAgoENDSPrpv/8kjegeDytv7uIaKwZ0zQH4j8Y7I=; b=wiDWyvgp89WoMkrWImizJzcSDpHdCS+qMSQ2TlN/Jqyeaph6EGWZBqjw5ObMHDzZxg Casf4QQJojxQ16vt2uLAr+H2gBvq1eElmmHO7fYmg6r9tifyUqTuj97pJ+kaMucSCxWY lALzQ/Ze/SAjgClL72VtsRZexaDOaguvk+jEe7Ecq+OdVBBlRf87nR763dA1M6XDaGl3 mvVHcPhChWFzdpCWlQiuojBXknlD3/HkryrDdJNIjtBP+qxLkK450l0GzvhoWGtjghv9 bNgn51T46T2dNQU7g1xtu6ru3EHtm4ilNLB4rX+O0sStgLZMkJo9Pw9k+IJW3cLC2PLf OJug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=LJFdmqgP; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-48259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCVmARV4VmhkkGiN4rPb8dYiE3k9rhTDT3rca4SdG0M5LN/C3+Zhrhmie3MeBBxQfxUVcJVWVjZqi+W5mcEOPvDL6w3zr4LSPdsrVm15AQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d21-20020a170902b71500b001d74bf99a3bsi11767990pls.575.2024.02.01.05.59.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 05:59:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48259-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=@google.com header.s=20230601 header.b=LJFdmqgP; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-48259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 F2106293EBB for ; Thu, 1 Feb 2024 13:47:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DCA262141; Thu, 1 Feb 2024 13:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LJFdmqgP" Received: from mail-vk1-f178.google.com (mail-vk1-f178.google.com [209.85.221.178]) (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 B38C65CDFF for ; Thu, 1 Feb 2024 13:46:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706795202; cv=none; b=k71m4xzyyq5bthG+O+oV9KXcQvAgt2QOUhZw5CkLkSAqIuesXVdWQuWcixacEs8lgIpBogDnGQ+zrRDxRoC/Sw12Tz9zSxi8/m0eAt9JrBYHCuyHySOHa9aGnZIes2sWuaNq++eXhsiflYwSzzmkuHyX/ku2MPeNhLQgEN9YY/M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706795202; c=relaxed/simple; bh=suoI7qvddasF6ze11GbOGjsGkZl9FBFquOHwW330phg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ZGBS2ivCa9C1rBeZHJJQv/xZ7Nw3p5CbaLBgGCnyMJZm3h8HfDdU+rCxWKqRdZ15tbqyEpMVVEZ6sSLEj6WDFAvBDTglGUknkT8bW77mH5sABvNN1UcVnUOhOpJIdQ2SINivszmUunLO1VmHjpFJMdkWwAkS6kjzeJ2yY07juSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=LJFdmqgP; arc=none smtp.client-ip=209.85.221.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-vk1-f178.google.com with SMTP id 71dfb90a1353d-4bd80b41cbdso342452e0c.3 for ; Thu, 01 Feb 2024 05:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706795199; x=1707399999; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gYWYexFtoJ2yHocou+INVoUtLbF8tOuPvQoRlZwm2yg=; b=LJFdmqgPnybJIumvPpfSejLkIEttxsn08suUHDAHBBpYlnfLY7vD/jAwsollH7N3F7 /3cqzMeD9q0atz+INW14/C+UpgvO/tSxQ3fo6LkcKvgvw4f2O2tNhFpqec8Fur9gMv3v riRH9dgwwFJulRbu22STv/MYccrOLORyGL5QxMh/eUmOqx/CtxxU0kTQRX3Xlpy9U69n YitNBjDNPl2IwwKRgG0yobZ+WUWalQ/yECvaisqyoop6BsFZXarkvBv0ii1pE/W0beLw 1xWK4Z/1h78PaQ7lFPIkIfmVGgl0xy/YC9sLuvBzw+MVlkobmg8Mtz/9WpmMqItaonPl hcWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706795199; x=1707399999; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gYWYexFtoJ2yHocou+INVoUtLbF8tOuPvQoRlZwm2yg=; b=RORbEy7kLMoMOAeXa82wLI+MavE7tVj6+0uyCUawTjM/pxUh2kBtjtU7JKL1fMWXBo k1pyh9X9r+3zP/idryHVHTUU1eaNvCiBbT5Sq7nwfqMzHWCMhX75FGHsjmdh6kMSM9Jy JKXWMYkq18hG4Ve1GL3pQC4n6bK0Cc2q7RxX2iHUEzPMJ87jJCrf19KBB5bsd7a/VZ5F nsjuZABc4RjvCAiUQNLotBsm5oR21JNa06fkNJvGHb+KMt6PCZccfIdi9Y++diwIWjNL /TlGxN1htkJXfFEuqd1G8m3pUkxlVSjdoh+0/fF/WyXUklBh7y3FBM0Wzzts4tDE3WBH Srcg== X-Gm-Message-State: AOJu0YyvT1JfgkVMB3a8IYqOJoyVe8btcDpqemikWnaGnQ607fM9Acir 1VqumdmOr28jcAbwo0Ocok7qrny+WlXF5pUfoU5yf+Uyzgp2lTPL/XSuiHRDTsRtUOtZlB6i4zc VEZa/btbfR0pNm5FG5lbGPgLKR/zlfsQrDHTB X-Received: by 2002:a05:6122:2a0d:b0:4b6:be94:acc6 with SMTP id fw13-20020a0561222a0d00b004b6be94acc6mr5599008vkb.10.1706795199311; Thu, 01 Feb 2024 05:46:39 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240201122216.2634007-1-aleksander.lobakin@intel.com> <20240201122216.2634007-2-aleksander.lobakin@intel.com> <3f6df876-4b25-4dc8-bbac-ce678c428d86@app.fastmail.com> In-Reply-To: <3f6df876-4b25-4dc8-bbac-ce678c428d86@app.fastmail.com> From: Alexander Potapenko Date: Thu, 1 Feb 2024 14:45:58 +0100 Message-ID: Subject: Re: [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read,write}() To: Arnd Bergmann Cc: Alexander Lobakin , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michal Swiatkowski , Marcin Szycik , Wojciech Drewek , Yury Norov , Andy Shevchenko , Rasmus Villemoes , Jiri Pirko , Ido Schimmel , Przemek Kitszel , Simon Horman , linux-btrfs@vger.kernel.org, dm-devel@redhat.com, ntfs3@lists.linux.dev, linux-s390@vger.kernel.org, "intel-wired-lan@lists.osuosl.org" , Netdev , linux-kernel@vger.kernel.org, Syed Nayyar Waris , William Breathitt Gray , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 1, 2024 at 2:23=E2=80=AFPM Arnd Bergmann wrote: > > On Thu, Feb 1, 2024, at 13:21, Alexander Lobakin wrote: > > From: Syed Nayyar Waris > > > > The two new functions allow reading/writing values of length up to > > BITS_PER_LONG bits at arbitrary position in the bitmap. > > > > The code was taken from "bitops: Introduce the for_each_set_clump macro= " > > by Syed Nayyar Waris with a number of changes and simplifications: > > - instead of using roundup(), which adds an unnecessary dependency > > on , we calculate space as BITS_PER_LONG-offset; > > - indentation is reduced by not using else-clauses (suggested by > > checkpatch for bitmap_get_value()); > > - bitmap_get_value()/bitmap_set_value() are renamed to bitmap_read() > > and bitmap_write(); > > - some redundant computations are omitted. > > These functions feel like they should not be inline but are > better off in lib/bitmap.c given their length. > > As far as I can tell, the header ends up being included > indirectly almost everywhere, so just parsing these functions > likey adds not just dependencies but also compile time. > > Arnd Removing particular functions from a header to reduce compilation time does not really scale. Do we know this case has a noticeable impact on the compilation time? If yes, maybe we need to tackle this problem in a different way (e.g. reduce the number of dependencies on it)?