From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 980F8280255 for ; Thu, 22 Sep 2016 19:53:03 -0400 (EDT) Received: by mail-pf0-f198.google.com with SMTP id v67so192713260pfv.1 for ; Thu, 22 Sep 2016 16:53:03 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com. [192.55.52.93]) by mx.google.com with ESMTPS id ud5si4372759pac.137.2016.09.22.16.53.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 22 Sep 2016 16:53:02 -0700 (PDT) From: Andi Kleen Subject: Re: [PATCH -v3 00/10] THP swap: Delay splitting THP during swapping out References: <1473266769-2155-1-git-send-email-ying.huang@intel.com> <20160922225608.GA3898@kernel.org> <045D8A5597B93E4EBEDDCBF1FC15F50935C1AD83@fmsmsx104.amr.corp.intel.com> Date: Thu, 22 Sep 2016 16:53:02 -0700 In-Reply-To: <045D8A5597B93E4EBEDDCBF1FC15F50935C1AD83@fmsmsx104.amr.corp.intel.com> (Tim C. Chen's message of "Thu, 22 Sep 2016 23:49:00 +0000") Message-ID: <87y42jo5k1.fsf@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: "Chen, Tim C" Cc: Shaohua Li , "Huang, Ying" , Andrew Morton , "Hansen, Dave" , "Kleen, Andi" , "Lu, Aaron" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Hugh Dickins , Minchan Kim , Rik van Riel , Andrea Arcangeli , "Kirill A . Shutemov" , Vladimir Davydov , Johannes Weiner , Michal Hocko "Chen, Tim C" writes: >> >>So this is impossible without THP swapin. While 2M swapout makes a lot of >>sense, I doubt 2M swapin is really useful. What kind of application is 'optimized' >>to do sequential memory access? Anything that touches regions larger than 4K and we want to do the kernel do minimal work to manage the swapping. > > We waste a lot of cpu cycles to re-compact 4K pages back to a large page > under THP. Swapping it back in as a single large page can avoid > fragmentation and this overhead. Also splitting something just to merge it again is wasteful. A lot of big improvements in the block and VM and network layers over the years came from avoiding that kind of wasteful work. -Andi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org