Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1601829rwb; Thu, 8 Dec 2022 12:48:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf6BdwHg2sdQpwXToYlNpVARu2TEXQspZSMh35ne24nidXh3IkKOiPCEdGQ3jIqIHn8hP2+/ X-Received: by 2002:aa7:d6d9:0:b0:46a:f635:6bb2 with SMTP id x25-20020aa7d6d9000000b0046af6356bb2mr44502868edr.270.1670532539390; Thu, 08 Dec 2022 12:48:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670532539; cv=none; d=google.com; s=arc-20160816; b=zztIzAJsPkyC7qJtHEXA9Q4Pm88M3a5pnVDAMqHYRgl6TmTGM4lRvrcW3q0ohIkFIr ZUDulQsKKF7GQxtQ2HfWxF5fq9qWZwN7yPo83M6szZ721k/0YsfwK5WycwIjBjvVtsn/ /U/be+J4Bv/IEmEXktcGjOmkXoXgQNN3zvY0YCylslRba3QyghGtDNxXaCB+biwvLv1N RQk7QS+u2hSP0Pqj9IdGW3tBlctH7AkCe8LGBiYwKWbJf9pg20qxyz6i6pjOR8gmc3CO Wer6wztOE0hCU9yTwZUDAOyOn+l/3VtOrZ6Oe+kA5dneUsNr7o3tvrN9MTIxd2R58tE4 OolQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kn6pAPyh7GVd4yH8ZcVetJ6KHkFeBkaGTE995AlcjFw=; b=xKQA+1xD3eaPca+wRm4qAtf6978f2s+3gl1q1PuFr0eJaNuAWwRUB8hrzST/tVsf1R VV+P/HKdK4xfjFW3b8QClM0Rx43Z7h0zKQXcNR8VIOW5DKwNbnNatEsZ2G19r2cnPQB0 2OW+DWjE6eTZXKPEduCWUbaJ+q6qnBiG4sD6YF1N3IADSEC+/1fDwouY0xStmoExdvBi AgnTUA7/12aNXiZc4GT0kxiVIzXByc0cxnFtXKJaPg0EZuglM2SjWX1I9AKW4WzSwI+l S7SuTL6SOvhdsxvAyTfHT+tPbA9NcY/35TwBJP1RF7kKbE3UYJkxqpca229BZbJy+ibg AyMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OgRFSxxK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz5-20020a1709072ce500b007c0f68539ecsi9481114ejc.604.2022.12.08.12.48.29; Thu, 08 Dec 2022 12:48:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OgRFSxxK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiLHUll (ORCPT + 99 others); Thu, 8 Dec 2022 15:41:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbiLHUlh (ORCPT ); Thu, 8 Dec 2022 15:41:37 -0500 Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B5D084B49; Thu, 8 Dec 2022 12:41:36 -0800 (PST) Received: by mail-oo1-xc36.google.com with SMTP id t15-20020a4a96cf000000b0049f7e18db0dso406955ooi.10; Thu, 08 Dec 2022 12:41:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=kn6pAPyh7GVd4yH8ZcVetJ6KHkFeBkaGTE995AlcjFw=; b=OgRFSxxKU/XYW75jfxIfe2MfQbklXKHvxUOmEBipoUobgiLU1dSoroxxBEl80631+b PyfzEZBfcqSASDlIh/jsUchLCUq9MfiehjbD7dB2JEVb0NK3W43FBKFuyFh2VQ0sAO1C G9f9tXxLqd8AhZgIQNYvqgRXUlNVHpHzUrd4Q9FBHX9TeDiGAWdk/0jZzVI1l/3Gt9Hr wkLwCMGhMKhk7Camqpa4+s/kdtOUdS0YPSJAJrWcMUkjgB0ZyuqkK+oyHPU2wtATBeKo 3loLg1RnDie2HI1kW6lxIragcixGM0Swq7NqhD/CogH0UyepiehKUjzdGN5Sn6cI71vs 1hoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=kn6pAPyh7GVd4yH8ZcVetJ6KHkFeBkaGTE995AlcjFw=; b=6oVdSh2hFW6L9bM5Ty82akDZ+WkHZMBPZHmNGCv90VXNlYDU4th3j14qW9NCFCN0Lj qhV246kj2EItrWys5tYtsE7zKrUeHDvNgNIKaJ85DMdKT88MkK9XggEoU2+T7O8aj6v7 58fEw/y5kEGHJNknPC1WIV4OtRjMqaS6smbFRQWSwUNJq0HdeqU3WaLPIXiCEc6u6D/B waiPCcfkD4fDaD96Stp0n/BL2cEGQzDMD/d24TMqZU7GWKMmJigZ89hHqERcJJy3UlH3 0zWpSSFyEDXQLhU8FBHAaxg7+dbL1GMM3lpg563Iow0FWPU7iGtI8Fz1sGhE441PH4W1 LMMg== X-Gm-Message-State: ANoB5pn6VCNLJYDDUNcn/0jWyhLMui5xjXVwDucPMcwdoKUG26l4Y4mz mDVqt9HAv6fXaRfQOUqjZjc= X-Received: by 2002:a4a:dc8c:0:b0:4a0:c270:2f3f with SMTP id g12-20020a4adc8c000000b004a0c2702f3fmr1887940oou.3.1670532095338; Thu, 08 Dec 2022 12:41:35 -0800 (PST) Received: from localhost ([12.97.180.36]) by smtp.gmail.com with ESMTPSA id j2-20020a4a9442000000b0049f0671a23asm10308930ooi.9.2022.12.08.12.41.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 12:41:34 -0800 (PST) Date: Thu, 8 Dec 2022 12:41:33 -0800 From: Yury Norov To: Peter Lafreniere Cc: linux-kernel@vger.kernel.org, "David S. Miller" , Andy Shevchenko , Barry Song , Ben Segall , haniel Bristot de Oliveira , Dietmar Eggemann , Gal Pressman , Greg Kroah-Hartman , Heiko Carstens , Ingo Molnar , Jakub Kicinski , Jason Gunthorpe , Jesse Brandeburg , Jonathan Cameron , Juri Lelli , Leon Romanovsky , Mel Gorman , Peter Zijlstra , Rasmus Villemoes , Saeed Mahameed , Steven Rostedt , Tariq Toukan , Tariq Toukan , Tony Luck , Valentin Schneider , Vincent Guittot , linux-crypto@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH v3 5/5] lib/cpumask: reorganize cpumask_local_spread() logic Message-ID: References: <20221208183101.1162006-1-yury.norov@gmail.com> <20221208183101.1162006-6-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Dec 08, 2022 at 08:17:22PM +0000, Peter Lafreniere wrote: > > Now after moving all NUMA logic into sched_numa_find_nth_cpu(), > > else-branch of cpumask_local_spread() is just a function call, and > > we can simplify logic by using ternary operator. > > > > While here, replace BUG() with WARN(). > Why make this change? It's still as bad to hit the WARN_ON as it was before. For example, because of this: > Greg, please don't do this > > > ChangeSet@1.614, 2002-09-05 08:33:20-07:00, greg@kroah.com > > USB: storage driver: replace show_trace() with BUG() > > that BUG() thing is _way_ out of line, and has killed a few of my machines > several times for no good reason. It actively hurts debuggability, because > the machine is totally dead after it, and the whole and ONLY point of > BUG() messages is to help debugging and make it clear that we can't handle > something. > > In this case, we _can_ handle it, and we're much better off with a machine > that works and that you can look up the messages with than killing it. > > Rule of thumb: BUG() is only good for something that never happens and > that we really have no other option for (ie state is so corrupt that > continuing is deadly). > > Linus