Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1140850imm; Tue, 5 Jun 2018 09:40:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL25wgwyM8uqoe1eg2iXvDAGDZXTv15yNPZzUxbjyBTNwD18O5SkPb92x7H5avxmpEzG4j1 X-Received: by 2002:a17:902:820a:: with SMTP id x10-v6mr1146512pln.179.1528216833014; Tue, 05 Jun 2018 09:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528216832; cv=none; d=google.com; s=arc-20160816; b=omd65gsOra+MP3gEZ1bv9QTpOWBGPvxK22uVyoJ7EZ1hikef5s4zi9yGqHhuRSe7km n4EGlN9sbUby2swuqL78YjyaAvQEzWVzc06B53vO0HTr/ZVJcDWoY/SUqGlGxIRAgSDI ow2RvgHmxw9BZbPlCwzs7OYU7rkSSgu+ip9uXfLT5J7+I/VesLsyE1dLU7ElBMAdTvdx ZuejUg177tlZgOn6LEJ2FdEYgS0cm9sZqaSpNX1jX5/sf8uEjK3s2eqy+bowGrJmzhWD +/8sO22Od3Xiw5FLDVMfVornrLrX4KLouYtQw9j25o23nlr9OCXfH+SkJ3KdD+Jalr+l AKYw== 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:arc-authentication-results; bh=KjRioP+09UawPfCnOVgEs7ef9JOsqAfjq4q74c4vRrw=; b=JQYNQJUzV4mTzLJ8HUrh2QbwF83IyrN0RsLwZKZbawaqeoIcU+Po8IpENcMnJpxjJw HVeAJZ6wvAhNhX+pEzuiOQVjKBaiF3nS1s3k4vN/PCcfE8kYzVYN57LAsIZzaWZhGTK+ jNJnd+cq6pA7ARYI09Q66W8dcfPfAlcxCjMu5T4IyQU4EzCT27rZRTi5Iirtz5I+viED NGkx+BrH5+MEoIJ71xUpsXqzVTyOYWftsnpkUCxLJ9y6kA1jnkhE9D2XlI0asaIigXbL DY7Oo6BuuAVzZpcQiw1oEozNVk3jY2Z8NdjW3pIaZVh9fr9K0TMvsAwTZWI9MuC/ZK7g uvxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=mbfYoHzH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4-v6si40648257pgn.54.2018.06.05.09.40.18; Tue, 05 Jun 2018 09:40:32 -0700 (PDT) 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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=mbfYoHzH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021AbeFEQio (ORCPT + 99 others); Tue, 5 Jun 2018 12:38:44 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:42304 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbeFEQim (ORCPT ); Tue, 5 Jun 2018 12:38:42 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w55GaBh3048552; Tue, 5 Jun 2018 16:38:38 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-2017-10-26; bh=KjRioP+09UawPfCnOVgEs7ef9JOsqAfjq4q74c4vRrw=; b=mbfYoHzHLPouOvAANuxxQ8YPAKlzX25N+q7v7UNqxsqD5HnT/HIpL4j3HQ9OpB0c2a6g Xsi0PvWTijxQ1gXtlKqzmzvaS3ul25WBVsJamGAfawunj2cUneG7Hacs4dNtCMtD87Am CpB7kixbGK7ZfkOxLD0/VbNA4IVuDUWrQ30NqNYiRFPk+fF0wPVX+1zmr9DhXYfXiJgH rIBk6ijieerNn37EM3mAuFLT7EMN8qgftzEEk8GERn4GF6OHUPoyeE/CX5Fv3dTIwpE5 HVqstslIutRBmgb6GtejACSF14AERCQCh+og2lUw5S+YZD+/jEh1izepmFTSdJb9FLE0 BA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2jbvyph4m0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Jun 2018 16:38:38 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w55Gcbtt001680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Jun 2018 16:38:37 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w55Gca0P026243; Tue, 5 Jun 2018 16:38:36 GMT Received: from ca-dmjordan1.us.oracle.com (/10.211.9.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 05 Jun 2018 09:38:36 -0700 Date: Tue, 5 Jun 2018 09:38:35 -0700 From: Daniel Jordan To: "Huang, Ying" Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -mm -V3 00/21] mm, THP, swap: Swapout/swapin THP in one piece Message-ID: <20180605163835.72n52hlrxtbjalhg@ca-dmjordan1.us.oracle.com> References: <20180523082625.6897-1-ying.huang@intel.com> <20180604180642.qexvwe5dqvkgraij@ca-dmjordan1.us.oracle.com> <87lgbt3ley.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lgbt3ley.fsf@yhuang-dev.intel.com> User-Agent: NeoMutt/20180323-268-5a959c X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8915 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806050191 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 05, 2018 at 12:30:13PM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > > On Wed, May 23, 2018 at 04:26:04PM +0800, Huang, Ying wrote: > >> And for all, Any comment is welcome! > >> > >> This patchset is based on the 2018-05-18 head of mmotm/master. > > > > Trying to review this and it doesn't apply to mmotm-2018-05-18-16-44. git > > fails on patch 10: > > > > Applying: mm, THP, swap: Support to count THP swapin and its fallback > > error: Documentation/vm/transhuge.rst: does not exist in index > > Patch failed at 0010 mm, THP, swap: Support to count THP swapin and its fallback > > > > Sure enough, this tag has Documentation/vm/transhuge.txt but not the .rst > > version. Was this the tag you meant? If so did you pull in some of Mike > > Rapoport's doc changes on top? > > I use the mmotm tree at > > git://git.cmpxchg.org/linux-mmotm.git > > Maybe you are using the other one? Yes I was, and I didn't know about this other tree, thanks! Working my way through your changes now. > > >> base optimized > >> ---------------- -------------------------- > >> %stddev %change %stddev > >> \ | \ > >> 1417897 2% +992.8% 15494673 vm-scalability.throughput > >> 1020489 4% +1091.2% 12156349 vmstat.swap.si > >> 1255093 3% +940.3% 13056114 vmstat.swap.so > >> 1259769 7% +1818.3% 24166779 meminfo.AnonHugePages > >> 28021761 -10.7% 25018848 2% meminfo.AnonPages > >> 64080064 4% -95.6% 2787565 33% interrupts.CAL:Function_call_interrupts > >> 13.91 5% -13.8 0.10 27% perf-profile.children.cycles-pp.native_queued_spin_lock_slowpath > >> > > ...snip... > >> test, while in optimized kernel, that is 96.6%. The TLB flushing IPI > >> (represented as interrupts.CAL:Function_call_interrupts) reduced > >> 95.6%, while cycles for spinlock reduced from 13.9% to 0.1%. These > >> are performance benefit of THP swapout/swapin too. > > > > Which spinlocks are we spending less time on? > > "perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irq.mem_cgroup_commit_charge.do_swap_page.__handle_mm_fault": 4.39, > "perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock.free_pcppages_bulk.drain_pages_zone.drain_pages": 1.53, > "perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock.get_page_from_freelist.__alloc_pages_slowpath.__alloc_pages_nodemask": 1.34, > "perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock.swapcache_free_entries.free_swap_slot.do_swap_page": 1.02, > "perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irq.shrink_inactive_list.shrink_node_memcg.shrink_node": 0.61, > "perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irq.shrink_active_list.shrink_node_memcg.shrink_node": 0.54, Nice, seems like lru_lock followed by zone->lock are the main improvements.