Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7814487ybl; Thu, 16 Jan 2020 06:07:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxynjeZAZbpfqCv5Pj70jAIumue/nc8qEc8BUE0uoqg+3kn7wcSxydjf+7OfXuGGSxZqMfr X-Received: by 2002:a05:6808:b15:: with SMTP id s21mr3915148oij.123.1579183630584; Thu, 16 Jan 2020 06:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579183630; cv=none; d=google.com; s=arc-20160816; b=H+Qfvo/rAjZS1uQKeccCXoUKmPI5hgoiaw47bBjaB3lRZnKUOVHfvjIUP5sgtpRs5E UK35BVj2REfNpCqFGpWdfIrVXibvXe6YtJ8sDK3RUH/RbL7uWdisinOehN60lCwPaQIr 41L4e6Ya7AUClmg9kx60Z3Be+B7s90fYbT5T3xBSCfc3gpjED0sNeEIou0LqmoS3OdD/ GRUTtE1DtSzOrCzBNnXwAuI5e3YkoTsPlFaT40+jogeb8DLafn6yFVyHa8GBUJvSQJ14 7QYIlA6pA4a2Wje2/qqqS7uJ1WTU1pwu88kMF7iuRPGHMXsC4Jk110lo7Uw28vj0DACo ZwFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=yqby80K3b9kCt242lwGPbjsFEt7IzDdob3A9oGZznKo=; b=h/VMBn23uol4FTqaR0lzwRJ2IZYYw9ZTAg228ZuYMntgO7ycgReO1XE6/MEw/N48ZP fcE6IZk/JM/ZurcMHlG2U8L65twTHYlXvv4qLlZIPc37yazjGSt1Nma4ppb5YV4Muh/t gjS/JtjcrsVH99s4WNUpm8EY87PtFyPxuJd8J+ukeHGGpfQccM7PY80xezV2lQcqspo1 8hAoYknHpQtXmpAIhP6dcJYqWj46XJI7BKlVj87h3Rzh+18BujGol7YRxR6BUgY+bLpZ DOJOg6pavG8OcKXfKCKQTnrFHwbad1rSrgZQ/Igm3Ymsz9PEsOrGTVaj4UI0oH+pB1H2 ibgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si12727240otq.83.2020.01.16.06.06.57; Thu, 16 Jan 2020 06:07:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbgAPOFi (ORCPT + 99 others); Thu, 16 Jan 2020 09:05:38 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:39400 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726084AbgAPOFh (ORCPT ); Thu, 16 Jan 2020 09:05:37 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B880875E1D42EA3BBE23; Thu, 16 Jan 2020 22:05:35 +0800 (CST) Received: from [127.0.0.1] (10.74.221.148) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Thu, 16 Jan 2020 22:05:29 +0800 Subject: Re: [PATCH] net: optimize cmpxchg in ip_idents_reserve To: David Miller References: <1579058620-26684-1-git-send-email-zhangshaokun@hisilicon.com> <20200116.042722.153124126288244814.davem@davemloft.net> CC: , , , , , , From: Shaokun Zhang Message-ID: Date: Thu, 16 Jan 2020 22:05:28 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20200116.042722.153124126288244814.davem@davemloft.net> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.74.221.148] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On 2020/1/16 20:27, David Miller wrote: > From: Shaokun Zhang > Date: Wed, 15 Jan 2020 11:23:40 +0800 > >> From: Yuqi Jin >> >> 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" >> Cc: Alexey Kuznetsov >> Cc: Hideaki YOSHIFUJI >> Cc: Eric Dumazet >> Cc: Yang Guo >> Signed-off-by: Yuqi Jin >> Signed-off-by: Shaokun Zhang > > 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. Ok, I will do it and resubmit. Thanks your reply, Shaokun > > Otherwise, I'm not applying this, sorry. > > . >