From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758945AbcH3SaA (ORCPT ); Tue, 30 Aug 2016 14:30:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45630 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753592AbcH3S36 (ORCPT ); Tue, 30 Aug 2016 14:29:58 -0400 Message-ID: <1472581792.10218.52.camel@redhat.com> Subject: Re: [PATCH -v2] mm: Don't use radix tree writeback tags for pages in swap cache From: Rik van Riel To: "Huang, Ying" , Andrew Morton Cc: tim.c.chen@intel.com, dave.hansen@intel.com, andi.kleen@intel.com, aaron.lu@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hugh Dickins , Shaohua Li , Minchan Kim , Mel Gorman , Tejun Heo , Wu Fengguang Date: Tue, 30 Aug 2016 14:29:52 -0400 In-Reply-To: <1472578089-5560-1-git-send-email-ying.huang@intel.com> References: <1472578089-5560-1-git-send-email-ying.huang@intel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-6GL+t+CT3wpTKeyMkMZ6" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 30 Aug 2016 18:29:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-6GL+t+CT3wpTKeyMkMZ6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-08-30 at 10:28 -0700, Huang, Ying wrote: > From: Huang Ying >=20 > File pages use a set of radix tree tags (DIRTY, TOWRITE, WRITEBACK, > etc.) to accelerate finding the pages with a specific tag in the > radix > tree during inode writeback.=C2=A0=C2=A0But for anonymous pages in the sw= ap > cache, there is no inode writeback.=C2=A0=C2=A0So there is no need to fin= d the > pages with some writeback tags in the radix tree.=C2=A0=C2=A0It is not > necessary > to touch radix tree writeback tags for pages in the swap cache. >=20 > Per Rik van Riel's suggestion, a new flag AS_NO_WRITEBACK_TAGS is > introduced for address spaces which don't need to update the > writeback > tags.=C2=A0=C2=A0The flag is set for swap caches.=C2=A0=C2=A0It may be us= ed for DAX file > systems, etc. >=20 > With this patch, the swap out bandwidth improved 22.3% (from ~1.2GB/s > to > ~ 1.48GBps) in the vm-scalability swap-w-seq test case with 8 > processes. > The test is done on a Xeon E5 v3 system.=C2=A0=C2=A0The swap device used = is a > RAM > simulated PMEM (persistent memory) device.=C2=A0=C2=A0The improvement com= es > from > the reduced contention on the swap cache radix tree lock.=C2=A0=C2=A0To t= est > sequential swapping out, the test case uses 8 processes, which > sequentially allocate and write to the anonymous pages until RAM and > part of the swap device is used up. >=20 > Details of comparison is as follow, >=20 > base=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0base+patch > ---------------- -------------------------- > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0%stddev=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0%change=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0%stddev > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0\=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0\ > =C2=A0=C2=A0=C2=A02506952 =C2=B1=C2=A0=C2=A02%=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0+28.1%=C2=A0=C2=A0=C2=A0=C2=A03212076 =C2=B1=C2=A0=C2=A07%=C2=A0=C2=A0vm= - > scalability.throughput > =C2=A0=C2=A0=C2=A01207402 =C2=B1=C2=A0=C2=A07%=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0+22.3%=C2=A0=C2=A0=C2=A0=C2=A01476578 =C2=B1=C2=A0=C2=A06%=C2=A0=C2=A0vm= stat.swap.so > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A010.86 =C2=B1 12%=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0-23.4%=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A08.31 =C2=B1 16%=C2=A0=C2= =A0perf-profile.cycles- > pp._raw_spin_lock_irq.__add_to_swap_cache.add_to_swap_cache.add_to_sw > ap.shrink_page_list > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A010.82 =C2=B1 13%=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0-33.1%=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A07.24 =C2=B1 14%=C2=A0=C2= =A0perf-profile.cycles- > pp._raw_spin_lock_irqsave.__remove_mapping.shrink_page_list.shrink_in > active_list.shrink_zone_memcg > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A010.36 =C2=B1 11%=C2=A0=C2=A0=C2=A0=C2=A0-10= 0.0%=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00.00 =C2=B1 -1%=C2=A0=C2=A0pe= rf-profile.cycles- > pp._raw_spin_lock_irqsave.__test_set_page_writeback.bdev_write_page._ > _swap_writepage.swap_writepage > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A010.52 =C2=B1 12%=C2=A0=C2=A0=C2=A0=C2=A0-10= 0.0%=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00.00 =C2=B1 -1%=C2=A0=C2=A0pe= rf-profile.cycles- > pp._raw_spin_lock_irqsave.test_clear_page_writeback.end_page_writebac > k.page_endio.pmem_rw_page >=20 > Cc: Hugh Dickins > Cc: Shaohua Li > Cc: Minchan Kim > Cc: Rik van Riel > Cc: Mel Gorman > Cc: Tejun Heo > Cc: Wu Fengguang > Cc: Dave Hansen > Signed-off-by: "Huang, Ying" >=20 Acked-by: Rik van Riel --=20 All rights reversed --=-6GL+t+CT3wpTKeyMkMZ6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJXxdChAAoJEM553pKExN6DxRAH/39iO1H9CGaZ6u1uX/WulTFY aDC1R/bUCbXECp/Ot7JMlV0pOzMZv+N6w2yUoAySG48EpiOO/RX01mDiNA3jhKp8 CI4jN15MaA/A4B+eJhjKpfOwuFdgl9Lb+3d3qXqUll1PTNGkpc1p5bVJgsf374hq eOgBvsxim534VqK8hDE3u82m5LssWk7lQLzLBcB3YjJM9MY04phJiQh0DA8xMkcC Jv4w/X755iLdeHUklnsG06vEeX1OJAl9lKTuG7rtcWdnQ9f6axFIS0dUtdpMtSZQ jh0/OjTwASiFNLhRd4wNsX/hkWAycZV60ZLpoeDhSViqP5x8vARF/ZpbyEyGEsQ= =vx8K -----END PGP SIGNATURE----- --=-6GL+t+CT3wpTKeyMkMZ6--