Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3121367ybk; Mon, 18 May 2020 18:43:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXlNIpPGAuCZ8YabN/2cY60kv1cg1oa+5FdxaO1+PTwK9tGexHaIiGU0UBrZIv8va8ls0a X-Received: by 2002:a17:906:2b8a:: with SMTP id m10mr17720949ejg.183.1589852606319; Mon, 18 May 2020 18:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589852606; cv=none; d=google.com; s=arc-20160816; b=B/PgvLxxD04Ybr816aBv0c/Hadj0mftcOJkqFtyhvrfhybuJabN4GXQd0rdp4X2XqO x8nfitj/hLlG6OZRIb+/ML7czKZcLSTU5L9CIy2O/Z+Sj+UB6l7Ng6qfHd9WrQGQ0KL+ YTYT5wqqCQBbkW7q6KHkFWDH/xMGZcMepIw5g3yqOBepPEHP3/ONUjZu2F5u7eyap+Xk iz3zSi3CedG1VPflfAxNlHlnz+uzkh1rT/XcFKj7zmCzNmKljExM9dwlYgOX4vlWiwwz df1H+zBQY7aE57kJneEuSVg720opudZNh4Z+mNU1LMmdstRH5bPuCsdiRO++zLhRvSbU aZ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jDTS7w/xwyzUFP6HaV5XTmjtQADYCYpRZiMlLiAahBw=; b=ksJbVFLi2W5TWuRktbv7cTAcN5UmHB1CYL9ugKe1Ppkd5W0G69xs2fBnsdjpBBwAfi L6d26SUpm1IxJJptdzL2aMVDhRlJkA1uWr+Eg+eHVxkn+0WQPWmQwFxQ9LJ3cvXmoglW DygrpVTn3D/GKR3C+Khgw2tLwX8crpWQUjce/cirBIvgst9g0FoJKV8u/jIjiyLAWMfQ RiCr6p907Do1tlFYbt6C5iVMFaF6wKPzpd9GbhFM0tFH5/WDu16sg435tM5Nd5UE6A4A 2q7izt6r54QMkbj/+4tEfVc0kDB1OAlisURDXEVi68a0ygXLMJhJaf2KbyJStHFWcgNU FeyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=PMA9Tx9c; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o22si7459566ejr.146.2020.05.18.18.43.04; Mon, 18 May 2020 18:43:26 -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=@oracle.com header.s=corp-2020-01-29 header.b=PMA9Tx9c; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbgESBlU (ORCPT + 99 others); Mon, 18 May 2020 21:41:20 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:59318 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726292AbgESBlU (ORCPT ); Mon, 18 May 2020 21:41:20 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04J1b4i9034179; Tue, 19 May 2020 01:41:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=jDTS7w/xwyzUFP6HaV5XTmjtQADYCYpRZiMlLiAahBw=; b=PMA9Tx9cG94UVxWndPtEg8PAYpSxLH2k2EFCpgLWmeQRQWJNBun3LKBnoD/lhuOlLSDn h1iuRi1a8U+5tvzo0PXeCFicxkinng7aJSeQSQNVpEKyvSbH+yHxxSRTnauR25ufnZmG ZB40fiUhDLAqA1gCoA+enMnDWrJ4X9p1i+OG2A20rLwZdjO1wVb21UwAZxoV+r8TpI/w xz4CjEKlCMDKe4DR53ak8CjuJOhIDskOB7RYcPaS814tSvmYFKJcwix4XnGwb+vPhUXm ABUnrAKDcBevi9/xQJXIebe6dEQIP1dpNoB/9Qn+v2j8QIGmuTHv2nH1EXGeil1ViUN8 xg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 3127kr2a33-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 May 2020 01:41:09 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04J1cM7i056366; Tue, 19 May 2020 01:39:09 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 312t3wtqtf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 May 2020 01:39:09 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04J1d740026790; Tue, 19 May 2020 01:39:07 GMT Received: from ca-dmjordan1.us.oracle.com (/10.211.9.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 May 2020 18:39:07 -0700 Date: Mon, 18 May 2020 21:39:30 -0400 From: Daniel Jordan To: "Huang, Ying" Cc: Daniel Jordan , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko , Minchan Kim , Tim Chen , Hugh Dickins Subject: Re: [PATCH] swap: Add percpu cluster_next to reduce lock contention on swap cache Message-ID: <20200519013930.zofr6iv6p5rk7kxm@ca-dmjordan1.us.oracle.com> References: <20200514070424.16017-1-ying.huang@intel.com> <20200515235140.xkznql332xmqvuf2@ca-dmjordan1.us.oracle.com> <87zha5kauc.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zha5kauc.fsf@yhuang-dev.intel.com> User-Agent: NeoMutt/20180716 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9625 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005190013 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9625 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 cotscore=-2147483648 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005190013 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 18, 2020 at 02:37:15PM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > On Thu, May 14, 2020 at 03:04:24PM +0800, Huang Ying wrote: > >> And the pmbench score increases 15.9%. > > > > What metric is that, and how long did you run the benchmark for? > > I run the benchmark for 1800s. The metric comes from the following > output of the pmbench, > > [1] Benchmark done - took 1800.088 sec for 122910000 page access > > That is, the throughput is 122910000 / 1800.088 = 68280.0 (accesses/s). > Then we sum the values from the different processes. Ok. > > It's just a nit but SWP_SOLIDSTATE and 'if (si->cluster_info)' are two ways to > > check the same thing and I'd stick with the one that's already there. > > Yes. In effect, (si->flags & SWP_SOLIDSTATE) and (si->cluster_info) > always has same value at least for now. But I don't think they are > exactly same in semantics. So I would rather to use their exact > semantics. Oh, but I thought the swap clusters were for scaling the locking for fast devices, so that both checks have the same semantics now, and presumably would in the future. It's a minor point, I'm fine either way. > The first swap slot is the swap partition header, you cand find the > corresponding code in syscall swapon function, below comments "Read the Aha, thanks.