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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E38B6C30653 for ; Mon, 1 Jul 2024 12:26:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3BE93218E; Mon, 1 Jul 2024 14:26:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3BE93218E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1719836776; bh=bcnNV5dpAp1ceLCDW/J9hztLgbbtYChtelB1u6t4YSQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DXv3ojlhkN9NJiavGKS7ChTxjJMlBmpR+po7X2K6TO/NVEvWOkDtl/rTmTJ3UixUk UUr2pe8O/ByOqgVdRLV1QEWgxYhwcJcMnD7f9UsfPln2QJj/HzUTQRAO60hyL7ZS0F cUZpt/NJ9SmE5hSaDOoXRFJSa2xmKG+r+qI0TSds= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 48F82F80612; Mon, 1 Jul 2024 14:21:11 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 71AC7F8971F; Mon, 1 Jul 2024 14:21:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A279BF8023A; Thu, 20 Jun 2024 20:32:51 +0200 (CEST) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E5696F801EB for ; Thu, 20 Jun 2024 20:32:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E5696F801EB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=YxTUw7fb Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-656d8b346d2so866802a12.2 for ; Thu, 20 Jun 2024 11:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718908345; x=1719513145; darn=alsa-project.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8iVi8v7MOsNpmY/+YQC9/JqsYXXSSMQtfI1oW5IIrXg=; b=YxTUw7fbI0QlhbNHcxA0LOUIckgOwunGLgBhQVpnjBj0R/XhwYk+qFEbqzeiyhV1BW xa1Jr/j+abS5fWbCUsZ8EAX44ZwVd6Mio1u6WyYwKYtEOIB3FJYfHoQ7zMhIwWfxr9g+ eICztuaittD4EwX3HIpO0II+/g5ACLk3cdf5vPtTZ+yDGyHGLCiAgj1RWtKch9rLCIow KotOteufHe2rQxXOh8eA1A3kQMs+Z6YuRPmFpvD7E/SPsP0LE+Epc0kunOIfCQn+hxf8 QsX2nDBr3TFY7PC4CcqFNCQehGVeoJl02IynlCXdydGE9tQgUj+C36dHq7x4XZSHy2xq BAsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718908345; x=1719513145; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8iVi8v7MOsNpmY/+YQC9/JqsYXXSSMQtfI1oW5IIrXg=; b=mY0mDhzsNg4K/fTg3haXW0mhZckm9iqPqLLegqBM7+/mRXqN8Qy7qo3dhQQnqm0759 26aCXWWjX8l9YzargFNFxJvhDLqAYxAJXJxLo3xzOrPBd9zjQKiZL+Z7va3ws5kpTp4/ 0mbemNDmCxXpAJ7ZaPnQbY8WD2ys4KgNIqQB3ZD7ofG9i55eMNH5i8OqV6T689qidI7/ bHRKV1iDdh5zPJtlNzgy9JOsO6M30H7m+C2ZxQGEhgg50RxEzfdLWFWnu6fHaBlnRzN3 jjUD4lbQOVCtwPytfS1w5MWt1wr+828sMtI7fmhb9y3eIgWrNd+kjQdh5X9/Bj/UXo3P clqw== X-Forwarded-Encrypted: i=1; AJvYcCVhN2IeQ5nrvDKT8huVJ4TtqBVwzC0yAfeh1ApDL+CJmQZhDxgCtlq3fbS0u75CwYU04VnfJxSzAR3MZjKAcmaiWSVoj5C2DkkgT84= X-Gm-Message-State: AOJu0YwQ2acCDyAzNkpGKBlP1ghlT2AHoOATN7/JBdedwpOnuNaJjuoa YsfRnoqNId6U0wCTyyYWQqGtyIxGfpU+T841vRmMPSeOZ4J7nIt1 X-Google-Smtp-Source: AGHT+IGwYt1/AWmTgUMNjVMcs2dgiLwPkNhT8ZohuoeI/pLSbMfw85UksxqJbsocMe0+kY+O1HneTA== X-Received: by 2002:a17:903:230c:b0:1f9:bb35:f313 with SMTP id d9443c01a7336-1f9bb35f5b7mr46779535ad.30.1718908344747; Thu, 20 Jun 2024 11:32:24 -0700 (PDT) Received: from localhost ([216.228.127.128]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f855e80ef6sm140498555ad.115.2024.06.20.11.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 11:32:23 -0700 (PDT) Date: Thu, 20 Jun 2024 11:32:21 -0700 From: Yury Norov To: Linus Torvalds 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 Subject: Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives Message-ID: References: <20240620175703.605111-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-MailFrom: yury.norov@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: CCGTGIJGEOXCAYLOUTFSQFGK5GY2K2YU X-Message-ID-Hash: CCGTGIJGEOXCAYLOUTFSQFGK5GY2K2YU X-Mailman-Approved-At: Mon, 01 Jul 2024 12:20:18 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, Jun 20, 2024 at 11:00:38AM -0700, Linus Torvalds wrote: > On Thu, 20 Jun 2024 at 10:57, Yury Norov wrote: > > > > > > The typical lock-protected bit allocation may look like this: > > If it looks like this, then nobody cares. Clearly the user in question > never actually cared about performance, and you SHOULD NOT then say > "let's optimize this that nobody cares about":. > > Yury, I spend an inordinate amount of time just double-checking your > patches. I ended up having to basically undo one of them just days > ago. Is that in master already? I didn't get any email, and I can't find anything related in the master branch. > 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. People notice some performance differences, but it's ~3%, no more. > Some kind of "look, this code is visible in profiles, so we actually care". The original motivation comes from a KCSAN report, so it's already visible in profiles. See [1] in cover letter. This series doesn't fix that particular issue, but it adds tooling that allow people to search and acquire bits in bitmaps without firing KCSAN warnings. This series fixes one real bug in the codebase - see #33, and simplifies bitmaps usage in many other places. Many people like it, and acked the patches. Again, this is NOT a performance series. Thanks, Yury > Because without numbers, I'm just not going to pull anything from you. > These insane inlines for things that don't matter need to stop. > > And if they *DO* matter, you need to show that they matter. > > Linus 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98D06C27C4F for ; Fri, 21 Jun 2024 06:02:50 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=IXhdyg7M; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4W56GJ1qC1z3fnl for ; Fri, 21 Jun 2024 16:02:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=IXhdyg7M; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::534; helo=mail-pg1-x534.google.com; envelope-from=yury.norov@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4W4pxm6FmJz3cQs for ; Fri, 21 Jun 2024 04:32:27 +1000 (AEST) Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-6e40d54e4a3so920618a12.0 for ; Thu, 20 Jun 2024 11:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718908345; x=1719513145; darn=lists.ozlabs.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8iVi8v7MOsNpmY/+YQC9/JqsYXXSSMQtfI1oW5IIrXg=; b=IXhdyg7MVgBxDF2O+F2Yex0w1Bi8vyr8rTOFqfQ16It/R2H6yvDtke5DfXKRwPmnjU AOL6R8q49gATRcBF5UN04RL7oPz4m+bKBY/86tG/dZDc7nuFy9z2Vwnxt3yTOEa7wtGr jLWXeTlcwEc2E91Iz+9qMFKYgXUJaiNnsHoxXeGMaB/f9jcvamMJPGbdUjy+5KbRdPsh oNfhXsu180mHOYms1swEHe9awPyvkFXarjHGCnIIJ66TDfhd8zjc0QCgL6A4PaSVs/gW nPan6WeyVxO3XISYsrM2eVtFssH3plVRxwI5QRCcTAENlCVcVKMPU/Nj9vY3tNT+GoRG ttVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718908345; x=1719513145; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8iVi8v7MOsNpmY/+YQC9/JqsYXXSSMQtfI1oW5IIrXg=; b=IUpG8iTQCvk7dIVL33txbCYY57KR9PTDW6HczZw8sUjJ0qVYu4uTsl1QUEEvmdtDld qd3Ft0VY0tytvNy8jLOOtd5RmlovYyNwSFN9x/Z7waPtGms4ulSRHFsvD5z8baY9GVF/ OnW6m5uhs8MTA1vyD9ukrT6O0FslJ2P3LUyisvaW1GkNinjnFE8hatdyeuGwsrB5+ETB g7soyK4qkX3gSfo7bbpjtvXOZIRUY0HaTA5cDsRDPVeUQOsOzaU52LZDmphl8CWgwzHI aI4LqRZ7bA7TtrVd8twlMbLO+6/tq7s5F2of8gjt8yoHtSQ0UIf8lG1EPz8MVM/qV13Y l7cA== X-Forwarded-Encrypted: i=1; AJvYcCX178xP/P+Zh1HJHfC4wFTzIJLMA7V5174t8CVevY+7JCZrp9Hkab1JxqFYXbhbF6PJL2xuyD0XFYsn+wZBk8HCuUHSO9AF9AYmg9KxTQ== X-Gm-Message-State: AOJu0Yzf1P/cIJX1YafW2yHGoLRa97CrEyVNVHPvU0on98TCrHOaYeKK 0mepzTBINEj/ZX4skUuVFw4RWBTnvx70cqtcd1jb/MfDQh7h/k+O X-Google-Smtp-Source: AGHT+IGwYt1/AWmTgUMNjVMcs2dgiLwPkNhT8ZohuoeI/pLSbMfw85UksxqJbsocMe0+kY+O1HneTA== X-Received: by 2002:a17:903:230c:b0:1f9:bb35:f313 with SMTP id d9443c01a7336-1f9bb35f5b7mr46779535ad.30.1718908344747; Thu, 20 Jun 2024 11:32:24 -0700 (PDT) Received: from localhost ([216.228.127.128]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f855e80ef6sm140498555ad.115.2024.06.20.11.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 11:32:23 -0700 (PDT) Date: Thu, 20 Jun 2024 11:32:21 -0700 From: Yury Norov To: Linus Torvalds Subject: Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives Message-ID: References: <20240620175703.605111-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Fri, 21 Jun 2024 15:58:23 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-sh@vger.kernel.org, Jaroslav Kysela , Hans Verkuil , "Md. Haris Iqbal" , "K. Y. Srinivasan" , Bart Van Assche , Geert Uytterhoeven , Jiri Pirko , Christian Brauner , Nicholas Piggin , Sergey Shtylyov , Thomas Gleixner , Karsten Keil , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, GR-QLogic-Storage-Upstream@marvell.com, Andrew Morton , Mark Rutland , alsa-devel@alsa-project.org, Dave Hansen , Eric Dumazet , Gregory Greenman , linux-s390@vger.kernel.org, Valentin Schneider , Leon Romanovsky , Will Deacon , mpi3mr-linuxdrv.pdl@broadcom.com, Hugh Dickins , iommu@lists.linux.dev, Martin Habets , linux-media@vger.kernel.org, Stanislaw Gruszka , linux-arm-msm@vger.kernel.org, Wenjia Zhang , linux-m68k@lists.linux-m68k.org, linux-arm-kernel@lists.infradead.org, Sean Christopherson , Oliver Neukum , Mirsad Todorovac , linux-pci@vger.kernel.org, Rasmus Villemoes , linux-hyperv@vger.kernel.org, Matthew Wilcox , Jiri Slaby , Rob Herring , linux-rdma@vger.kernel.org, Damien Le Moal , ath10k@lists.infradead.org, David Disseldorp , Paolo Abeni , Fenghua Yu , Kees Cook , "James E.J. Bottomley" , Akinobu Mita , Steven Rostedt , Borislav Petkov , Mauro Carvalho Chehab , Thomas Bogendoerfer , Edward Cree , Shuai Xue , netdev@vger.kernel.org, "David S. Miller" , Rich Felker , Jan Kara , kvm@vger.kernel.org, Peter Zijlstra , "H. Peter Anvin" , sparclinux@vger.kernel.org, Alexey Klimov , Ping-Ke Shih , linux-scsi@vger.kernel.org, linux-net-drivers@amd.com, x86@kernel.org, Jason Gunthorpe , Ingo Molnar , linux-serial@vger.kernel.org, Jakub Kicinski , Chaitanya Kulkarni , Kalle Valo , linux-block@vger.kernel.org, Hans de Goede , linux-sound@vger.kernel.org, Jens Axboe , Michal Simek , Yoshinori Sato , Robin Murphy , Bjorn Andersson , linux-mips@vger.kernel.org, linux-bluetooth@vger.kernel.org, dmaengine@vger.kernel.org, Paolo Bonzini , Vitaly Kuznetsov , linuxppc-dev@lists.ozlabs.org, Karsten Graul Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Jun 20, 2024 at 11:00:38AM -0700, Linus Torvalds wrote: > On Thu, 20 Jun 2024 at 10:57, Yury Norov wrote: > > > > > > The typical lock-protected bit allocation may look like this: > > If it looks like this, then nobody cares. Clearly the user in question > never actually cared about performance, and you SHOULD NOT then say > "let's optimize this that nobody cares about":. > > Yury, I spend an inordinate amount of time just double-checking your > patches. I ended up having to basically undo one of them just days > ago. Is that in master already? I didn't get any email, and I can't find anything related in the master branch. > 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. People notice some performance differences, but it's ~3%, no more. > Some kind of "look, this code is visible in profiles, so we actually care". The original motivation comes from a KCSAN report, so it's already visible in profiles. See [1] in cover letter. This series doesn't fix that particular issue, but it adds tooling that allow people to search and acquire bits in bitmaps without firing KCSAN warnings. This series fixes one real bug in the codebase - see #33, and simplifies bitmaps usage in many other places. Many people like it, and acked the patches. Again, this is NOT a performance series. Thanks, Yury > Because without numbers, I'm just not going to pull anything from you. > These insane inlines for things that don't matter need to stop. > > And if they *DO* matter, you need to show that they matter. > > Linus