Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp750553ybj; Thu, 7 May 2020 06:52:42 -0700 (PDT) X-Google-Smtp-Source: APiQypJMgbfyIFJqmazQAbdO8qLTsKoX0a7ZpuoehNuoNXuHNcR0yaqh8Tc39xelLbAnZURO1Da6 X-Received: by 2002:a17:906:328c:: with SMTP id 12mr11369779ejw.69.1588859562721; Thu, 07 May 2020 06:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588859562; cv=none; d=google.com; s=arc-20160816; b=eNoHrZJ8VyAPFQEJXiqajIW7nxBovVwTQrHbV6MT4TQp3YNFu4lbCPHt1ILFRJ41Fx FVdMCc0BTK3+9LDAt3LZTAJgin0uYzvDg8YBuOkZjfCDYHyrXs5gygG/UoIKbPnzZzVD BixqbrKZumoghCREOYIpxEVSWCnV/QvIBmFPJ0FtDpJyHp7AnQNFS7VckqMCbboUxHF7 Bb6PFXVJL0zRUkFYVNHlj1oQLQfDptn3B4MrFB+J04PmTEtvqUjskL3eo5clGljwdmtD Kiuzl22VTCX3sZqH0ItKlxEq26uyq/0PWEW+3K6MTWfh8yB5CAirG4k+BTEyYj3rGB4N ZaGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RmR99xx+Yesm6oorgLPy7gPshtSDq8wvp8OCFeJfg9c=; b=v4GBbG5AwZCPHdqCdns1vWiHuglB4e85v+Achkn8s3CMgAiNIV6KJJfjUYLmRr5rk6 s6CDkrYfCIggPV6d+ei0qEa6uXOJxIQ+siN0LoLS2LhcotjjLeLCcwL6bYATSyJcQFKy fjbc96Fcc6vmvGVnmoX9MOtCqH93+Zo1FPncVJ473uDDm43S12jA5C8LXtRjM6p3KNCP k4kJwvKJfvEthLfiNakyNsUOtj+0Z0fBEyzSmyO0oLryjoWH5wbYAVtfdHHekK46PLQB 78G2gVyZ62+U308by+q9xxvYpWFFts+ZEVumTh+nWHi8NYNTUePf6pnEX/ylPuXqUzW+ eetg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=e2346PGD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si3329016edf.183.2020.05.07.06.52.14; Thu, 07 May 2020 06:52:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=e2346PGD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726884AbgEGNuD (ORCPT + 99 others); Thu, 7 May 2020 09:50:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726521AbgEGNuA (ORCPT ); Thu, 7 May 2020 09:50:00 -0400 Received: from mail-yb1-xb43.google.com (mail-yb1-xb43.google.com [IPv6:2607:f8b0:4864:20::b43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E909DC05BD43 for ; Thu, 7 May 2020 06:49:59 -0700 (PDT) Received: by mail-yb1-xb43.google.com with SMTP id r14so2941800ybm.12 for ; Thu, 07 May 2020 06:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RmR99xx+Yesm6oorgLPy7gPshtSDq8wvp8OCFeJfg9c=; b=e2346PGDvrAMzUO2Mv86gFcgr729Ua8DFn3nGE4JDikbENkM6tT559dmqxIbt0UUTm hdoTkstFceX+NH9kO5ZGH/Ho4VsjAV3Nhrr4h9wZnztBpuISSGImg27AgICD+D4IKoSK ro5WFuh7ssWcEXH+dL8zYlG/k8XW/7gSHrNeyGgcuy2g/7LiQau37jTLz3hhbEK8BQ9W Ghxo54dMjeYBAG1BKRjC2/63ZCIrkuaHQ9PR6GAf7cgniEZ7HMYbEgvtHGp3f3UYwPRj QK1rCytsf4HMLSf7luqvIPBWLSDGoX1xMaaQBSb7XIOks2Z/JmXc6Lue2+7EjSTpc4W2 nl3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RmR99xx+Yesm6oorgLPy7gPshtSDq8wvp8OCFeJfg9c=; b=VO1e1r5XQlpecSvhap3pEyOlcmlRnCzs7SSdtmNGsmtjG3De8OOcqllKAry+YhZTB2 So4JNUeEw6KPxdw3b2a/LdoJEJK+y9w7i0tgf8xc5vntJOQ4LPkYzy0klu9UufebQkc1 UQvsBfWdCl+O+HYitwRm+gtWpvXAEzIC1IVTI7FQWksNPsskZywsZXzdQxw6y3cBUlDq Q2bM+jX9d+e+VcC+0AtGUBgyHuXxjre+tvUGwE6Xp4026ThwNxqm5CAkB+4E1ddR1+1L gKO56FuCFJP6RmXndFPHN4I5YOrjIKlKq4uEBlAhaRbHMh2aXUYNzgeBzcsFT+mWX9Bo msJw== X-Gm-Message-State: AGi0PubrtzCP/zjIwrqLCBR62VuRNeLCu3nvkZs3762y29mijz9dFD75 59ahWSBJpgaoH+3q1/0+ZKNXtjC0Uwarrh7XWIGDdw== X-Received: by 2002:a25:1484:: with SMTP id 126mr22422004ybu.380.1588859398853; Thu, 07 May 2020 06:49:58 -0700 (PDT) MIME-Version: 1.0 References: <20200116.042722.153124126288244814.davem@davemloft.net> <930faaff-4d18-452d-2e44-ef05b65dc858@gmail.com> <1b3aaddf-22f5-1846-90f1-42e68583c1e4@gmail.com> <430496fc-9f26-8cb4-91d8-505fda9af230@hisilicon.com> <20200117123253.GC14879@hirez.programming.kicks-ass.net> <7e6c6202-24bb-a532-adde-d53dd6fb14c3@gmail.com> <20200117180324.GA2623847@rani.riverdale.lan> <94573cea-a833-9b48-6581-8cc5cdd19b89@gmail.com> <20200117183800.GA2649345@rani.riverdale.lan> <45224c36-9941-aae5-aca4-e2c8e3723355@gmail.com> <20200120081858.GI14879@hirez.programming.kicks-ass.net> <39ddacf9-adbe-c3f5-45a8-9c5280ef11bb@hisilicon.com> In-Reply-To: <39ddacf9-adbe-c3f5-45a8-9c5280ef11bb@hisilicon.com> From: Eric Dumazet Date: Thu, 7 May 2020 06:49:46 -0700 Message-ID: Subject: Re: [PATCH] net: optimize cmpxchg in ip_idents_reserve To: Shaokun Zhang Cc: Peter Zijlstra , Eric Dumazet , Arvind Sankar , David Miller , netdev , LKML , jinyuqi@huawei.com, Alexey Kuznetsov , Hideaki YOSHIFUJI , guoyang2@huawei.com, Will Deacon Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 7, 2020 at 2:12 AM Shaokun Zhang wrote: > > Hi Peter/Eric, > > Shall we use atomic_add_return() unconditionally and add some comments? Or I missed > something. > Yes. A big fat comment, because I do not want yet another bogus complaint from someone playing with a buggy UBSAN.