Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751352AbdHBWOC (ORCPT ); Wed, 2 Aug 2017 18:14:02 -0400 Received: from mga01.intel.com ([192.55.52.88]:55038 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133AbdHBWOB (ORCPT ); Wed, 2 Aug 2017 18:14:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,313,1498546800"; d="scan'208";a="118891584" Date: Wed, 2 Aug 2017 16:13:59 -0600 From: Ross Zwisler To: Matthew Wilcox Cc: Ross Zwisler , Andrew Morton , linux-kernel@vger.kernel.org, "karam . lee" , Minchan Kim , 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: <20170802221359.GA20666@linux.intel.com> References: <20170728165604.10455-1-ross.zwisler@linux.intel.com> <20170728173143.GE15980@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170728173143.GE15980@bombadil.infradead.org> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2473 Lines: 49 On Fri, Jul 28, 2017 at 10:31:43AM -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. Okay, I've run a bunch of performance tests with the PMEM and with BTT entry points for rw_pages() in a swap workload, and in all cases I do see an improvement over the code when rw_pages() is removed. Here are the results from my random lab box: Average latency of swap_writepage() +------+------------+---------+-------------+ | | no rw_page | rw_page | Improvement | +-------------------------------------------+ | PMEM | 5.0 us | 4.7 us | 6% | +-------------------------------------------+ | BTT | 6.8 us | 6.1 us | 10% | +------+------------+---------+-------------+ Average latency of swap_readpage() +------+------------+---------+-------------+ | | no rw_page | rw_page | Improvement | +-------------------------------------------+ | PMEM | 3.3 us | 2.9 us | 12% | +-------------------------------------------+ | BTT | 3.7 us | 3.4 us | 8% | +------+------------+---------+-------------+ The workload was pmbench, a memory benchmark, run on a system where I had severely restricted the amount of memory in the system with the 'mem' kernel command line parameter. The benchmark was set up to test more memory than I allowed the OS to have so it spilled over into swap. The PMEM or BTT device was set up as my swap device, and during the test I got a few hundred thousand samples of each of swap_writepage() and swap_writepage(). The PMEM/BTT device was just memory reserved with the memmap kernel command line parameter. Thanks, Matthew, for asking for performance data. It looks like removing this code would have been a mistake.