Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751596AbdG3Wiy (ORCPT ); Sun, 30 Jul 2017 18:38:54 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:35228 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbdG3Wix (ORCPT ); Sun, 30 Jul 2017 18:38:53 -0400 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.220.163 X-Original-MAILFROM: minchan@kernel.org Date: Mon, 31 Jul 2017 07:38:51 +0900 From: Minchan Kim To: Andrew Morton Cc: Matthew Wilcox , Ross Zwisler , linux-kernel@vger.kernel.org, "karam . lee" , Jerome Marchand , Nitin Gupta , seungho1.park@lge.com, Christoph Hellwig , Dan Williams , Dave Chinner , Jan Kara , Jens Axboe , Vishal Verma , linux-nvdimm@lists.01.org Subject: Re: [PATCH 0/3] remove rw_page() from brd, pmem and btt Message-ID: <20170730223851.GB28031@bbox> References: <20170728165604.10455-1-ross.zwisler@linux.intel.com> <20170728173143.GE15980@bombadil.infradead.org> <20170728142123.729b20e9fcf45c6a814f18e7@linux-foundation.org> <20170730221659.GA28031@bbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170730221659.GA28031@bbox> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1939 Lines: 38 On Mon, Jul 31, 2017 at 07:16:59AM +0900, Minchan Kim wrote: > Hi Andrew, > > On Fri, Jul 28, 2017 at 02:21:23PM -0700, Andrew Morton wrote: > > On Fri, 28 Jul 2017 10:31:43 -0700 Matthew Wilcox wrote: > > > > > On Fri, Jul 28, 2017 at 10:56:01AM -0600, Ross Zwisler wrote: > > > > Dan Williams and Christoph Hellwig have recently expressed doubt about > > > > whether the rw_page() interface made sense for synchronous memory drivers > > > > [1][2]. It's unclear whether this interface has any performance benefit > > > > for these drivers, but as we continue to fix bugs it is clear that it does > > > > have a maintenance burden. This series removes the rw_page() > > > > implementations in brd, pmem and btt to relieve this burden. > > > > > > Why don't you measure whether it has performance benefits? I don't > > > understand why zram would see performance benefits and not other drivers. > > > If it's going to be removed, then the whole interface should be removed, > > > not just have the implementations removed from some drivers. > > > > Yes please. Minchan, could you please take a look sometime? > > rw_page's gain is reducing of dynamic allocation in swap path > as well as performance gain thorugh avoiding bio allocation. > And it would be important in memory pressure situation. > > I guess it comes from bio_alloc mempool. Usually, zram-swap works > in high memory pressure so mempool would be exahusted easily. > It means that mempool wait and repeated alloc would consume the > overhead. > > Actually, at that time although Karam reported the gain is 2.4%, > I got a report from production team that the gain in corner case > (e.g., animation playing is smooth) would be much higher than > expected. One of the idea is to create bioset only for swap without sharing with FS so bio allocation for swap doesn't need to wait returning bio from FS side which does slow nand IO to mempool.