From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 0C0381B4C3D for ; Thu, 20 Jun 2024 19:32:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718911952; cv=none; b=b3y6PItcmELd9sfqvFchYlWnJ8qwzAl2D29ifq1gDbLnQEKXqD9KFl0e24Ic8wkTcJaW7pOHDXYtRTxQWkxaRTJasoW6K7/2BhbsZ63qV79JiAx4UO/Xik/K8zuNlngH872ChaMkqNrIdWVq1zAR6iMMkmXJaQIoM+2DhAARvOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718911952; c=relaxed/simple; bh=LMJhwXKqZKwDoZfSA47gsl66tl0ZA7Fm/pP5alDoprs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Rb0lgJlsDjad6dyEakItZroQu7mjqfFboPmeiaL4wcSELW1Vg+ncVUb2mtxptHmV2EI5+wPGxEgv7vLmZ/LQXvRtGgng4VsAQs1L+WlO220Q2AmGSA39nKn6ct1IVA/hXvrQCjvhIRWkpcw7b7exQ3ZpQMtosK8qrFO8Hq5Xd2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=H047bh8a; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="H047bh8a" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-52bc274f438so1642581e87.0 for ; Thu, 20 Jun 2024 12:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1718911949; x=1719516749; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rxmltmQrKwAluprbf/AG1nvFIcYg57/7dnDwU0ucSDg=; b=H047bh8ax45Q2gAfM81KItKM8qza1QtlddUHtmOuck5FjiqvnVZifERn1w7/WAlY3A 7iFK4kv7w4IonKohkkuj2A+jnkswD0v0bLIKzh9Fom8yNUD2rqUW8bqbfHKpJIigGJm1 DFhvHSi5wx0A3BosLln7MNHWPUKlbxAqMqWeQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718911949; x=1719516749; h=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=rxmltmQrKwAluprbf/AG1nvFIcYg57/7dnDwU0ucSDg=; b=rb3k/pU3GWp1CdxL9NLlrdsrQImhctdsuL9v/1XHYQ9a+r2zSMMyHvaS7UCFuvZRJh g1PEdZAOJvCd3hkxHqW/acuTzl0rRbGu13gDOOA/jWR65Q6OdzaFpAMbVsOikMQMB/q3 ZOcETp8rXGaeLHW+vCHiTjp55Wxf+SmM2u48F/SeWKtromGU09QWVe3Ec6YiUIEXDGfR 48STqS1WqkElF3sj5zvp7PZplFWkpBt7GEIWDD8vtx9wmtc2t/hTLkhvXR6rJ2UfCIKY fl3uyiO5DlvZ38EFqw38W8FUFCxvNAXRd6AOCdAHZsAY5ZXKx6fuXfsgTd9CueTMY6lH M9ig== X-Forwarded-Encrypted: i=1; AJvYcCVaHpj16VgiM05ZZEGMQf10yYU8en7njqDIQaqWuVbK9Cj1cgNWBw3W5qTNvNn8IblRVxwHBiz3wEwqtGqFJ35EbEx3fuD+ X-Gm-Message-State: AOJu0Yyd1VTrPBk5hBX0q2xOqFFPPtu5KUyPjuPnqC6tLeXW1GJ1iUH7 naGsmvZyP7HC2VLa2uex85xp0HBXOeyhQ9HjEUgotuwWHZpgPWkON+CIjmuvu7NO95xNbpey1ND sDR/P2isF X-Google-Smtp-Source: AGHT+IGoWy2hrIiEka8qRA9sKmvUFRp/tOJlY9mimORx7fsScn53Ee72VZzLc3kZ+WgzCr9O6+KoLA== X-Received: by 2002:a05:6512:3da7:b0:52c:6d10:3ae4 with SMTP id 2adb3069b0e04-52ccaa59529mr5040983e87.2.1718911949188; Thu, 20 Jun 2024 12:32:29 -0700 (PDT) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com. [209.85.221.47]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72ce08bsm9970987a12.1.2024.06.20.12.32.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jun 2024 12:32:28 -0700 (PDT) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-364b2f92388so874034f8f.2 for ; Thu, 20 Jun 2024 12:32:28 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVLn+0DInqbQ0DjOJpr6iOYIKtbva18jcP7nkOCykJ1W8YM3VlQNX4rXsT26JkPlRkV2twttIEYguOMueFH6PnewwqIZDJ4 X-Received: by 2002:a5d:6152:0:b0:35f:308a:cab0 with SMTP id ffacd0b85a97d-363170ecbe5mr4379764f8f.13.1718911595412; Thu, 20 Jun 2024 12:26:35 -0700 (PDT) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240620175703.605111-1-yury.norov@gmail.com> In-Reply-To: From: Linus Torvalds Date: Thu, 20 Jun 2024 12:26:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives To: Yury Norov Cc: linux-kernel@vger.kernel.org, "David S. Miller" , "H. Peter Anvin" , "James E.J. Bottomley" , "K. Y. Srinivasan" , "Md. Haris Iqbal" , Akinobu Mita , Andrew Morton , Bjorn Andersson , Borislav Petkov , Chaitanya Kulkarni , Christian Brauner , Damien Le Moal , Dave Hansen , David Disseldorp , Edward Cree , Eric Dumazet , Fenghua Yu , Geert Uytterhoeven , Greg Kroah-Hartman , Gregory Greenman , Hans Verkuil , Hans de Goede , Hugh Dickins , Ingo Molnar , Jakub Kicinski , Jaroslav Kysela , Jason Gunthorpe , Jens Axboe , Jiri Pirko , Jiri Slaby , Kalle Valo , Karsten Graul , Karsten Keil , Kees Cook , Leon Romanovsky , Mark Rutland , Martin Habets , Mauro Carvalho Chehab , Michael Ellerman , Michal Simek , Nicholas Piggin , Oliver Neukum , Paolo Abeni , Paolo Bonzini , Peter Zijlstra , Ping-Ke Shih , Rich Felker , Rob Herring , Robin Murphy , Sean Christopherson , Shuai Xue , Stanislaw Gruszka , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Valentin Schneider , Vitaly Kuznetsov , Wenjia Zhang , Will Deacon , Yoshinori Sato , GR-QLogic-Storage-Upstream@marvell.com, alsa-devel@alsa-project.org, ath10k@lists.infradead.org, dmaengine@vger.kernel.org, iommu@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-block@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-media@vger.kernel.org, linux-mips@vger.kernel.org, linux-net-drivers@amd.com, linux-pci@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-serial@vger.kernel.org, linux-sh@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mpi3mr-linuxdrv.pdl@broadcom.com, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Alexey Klimov , Bart Van Assche , Jan Kara , Matthew Wilcox , Mirsad Todorovac , Rasmus Villemoes , Sergey Shtylyov Content-Type: text/plain; charset="UTF-8" On Thu, 20 Jun 2024 at 11:32, Yury Norov wrote: > > Is that in master already? I didn't get any email, and I can't find > anything related in the master branch. It's 5d272dd1b343 ("cpumask: limit FORCE_NR_CPUS to just the UP case"). > > New rule: before you send some optimization, you need to have NUMBERS. > > I tried to underline that it's not a performance optimization at my > best. If it's not about performance, then it damn well shouldn't be 90% inline functions in a header file. If it's a helper function, it needs to be a real function elsewhere. Not this: include/linux/find_atomic.h | 324 +++++++++++++++++++ because either performance really matters, in which case you need to show profiles, or performance doesn't matter, in which case it damn well shouldn't have special cases for small bitsets that double the size of the code. Linus