netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: zhangshaokun@hisilicon.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jinyuqi@huawei.com, kuznet@ms2.inr.ac.ru,
	yoshfuji@linux-ipv6.org, edumazet@google.com,
	guoyang2@huawei.com
Subject: Re: [PATCH] net: optimize cmpxchg in ip_idents_reserve
Date: Thu, 16 Jan 2020 04:27:22 -0800 (PST)	[thread overview]
Message-ID: <20200116.042722.153124126288244814.davem@davemloft.net> (raw)
In-Reply-To: <1579058620-26684-1-git-send-email-zhangshaokun@hisilicon.com>

From: Shaokun Zhang <zhangshaokun@hisilicon.com>
Date: Wed, 15 Jan 2020 11:23:40 +0800

> From: Yuqi Jin <jinyuqi@huawei.com>
> 
> atomic_try_cmpxchg is called instead of atomic_cmpxchg that can reduce
> the access number of the global variable @p_id in the loop. Let's
> optimize it for performance.
> 
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Yang Guo <guoyang2@huawei.com>
> Signed-off-by: Yuqi Jin <jinyuqi@huawei.com>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>

I doubt this makes any measurable improvement in performance.

If you can document a specific measurable improvement under
a useful set of circumstances for real usage, then put those
details into the commit message and resubmit.

Otherwise, I'm not applying this, sorry.

  reply	other threads:[~2020-01-16 12:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15  3:23 [PATCH] net: optimize cmpxchg in ip_idents_reserve Shaokun Zhang
2020-01-16 12:27 ` David Miller [this message]
2020-01-16 14:05   ` Shaokun Zhang
2020-01-16 15:12   ` Eric Dumazet
2020-01-16 15:19     ` Eric Dumazet
2020-01-17  6:54       ` Shaokun Zhang
2020-01-17 12:32         ` Peter Zijlstra
2020-01-17 16:35           ` Eric Dumazet
2020-01-17 18:03             ` Arvind Sankar
2020-01-17 18:16               ` Eric Dumazet
2020-01-17 18:38                 ` Arvind Sankar
2020-01-17 18:48                   ` Eric Dumazet
2020-01-20  8:18                     ` Peter Zijlstra
2020-05-07  9:12                       ` Shaokun Zhang
2020-05-07 13:49                         ` Eric Dumazet
2020-01-19  3:46           ` Shaokun Zhang
2020-01-19  4:12             ` Eric Dumazet
2020-01-21  2:40               ` Shaokun Zhang
2020-01-22  8:49               ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200116.042722.153124126288244814.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=guoyang2@huawei.com \
    --cc=jinyuqi@huawei.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    --cc=zhangshaokun@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).