From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5184221CF94E1 for ; Mon, 31 Jul 2017 00:41:58 -0700 (PDT) Date: Mon, 31 Jul 2017 09:44:04 +0200 From: Christoph Hellwig Subject: Re: [PATCH 0/3] remove rw_page() from brd, pmem and btt Message-ID: <20170731074404.GA16749@lst.de> References: <20170728165604.10455-1-ross.zwisler@linux.intel.com> <20170728173143.GE15980@bombadil.infradead.org> <20170728142123.729b20e9fcf45c6a814f18e7@linux-foundation.org> <20170730221659.GA28031@bbox> <20170731071707.GA16299@lst.de> <20170731073647.GA26199@bbox> <20170731074206.GA16706@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170731074206.GA16706@lst.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Minchan Kim Cc: Jens Axboe , Jerome Marchand , linux-nvdimm@lists.01.org, Dave Chinner , linux-kernel@vger.kernel.org, Matthew Wilcox , seungho1.park@lge.com, Jan Kara , Andrew Morton , "karam . lee" , Christoph Hellwig , Nitin Gupta List-ID: On Mon, Jul 31, 2017 at 09:42:06AM +0200, Christoph Hellwig wrote: > On Mon, Jul 31, 2017 at 04:36:47PM +0900, Minchan Kim wrote: > > Do you suggest define something special flag(e.g., SWP_INMEMORY) > > for in-memory swap to swap_info_struct when swapon time manually > > or from bdi_queue_someting automatically? > > And depending the flag of swap_info_struct, use the onstack bio > > instead of dynamic allocation if the swap device is in-memory? > > Currently swap always just does I/O on a single page as far > as I can tell, so it can always just use an on-stack bio and > biovec. That's for synchronous I/O, aka reads of course. For writes you'll need to do a dynamic allocation if they are asynchronous. But yes, if we want to force certain devices to be synchronous we'll need a flag for that. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbdGaHoH (ORCPT ); Mon, 31 Jul 2017 03:44:07 -0400 Received: from verein.lst.de ([213.95.11.211]:56354 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbdGaHoG (ORCPT ); Mon, 31 Jul 2017 03:44:06 -0400 Date: Mon, 31 Jul 2017 09:44:04 +0200 From: Christoph Hellwig To: Minchan Kim Cc: Christoph Hellwig , Andrew Morton , Matthew Wilcox , Ross Zwisler , linux-kernel@vger.kernel.org, "karam . lee" , Jerome Marchand , Nitin Gupta , seungho1.park@lge.com, 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: <20170731074404.GA16749@lst.de> References: <20170728165604.10455-1-ross.zwisler@linux.intel.com> <20170728173143.GE15980@bombadil.infradead.org> <20170728142123.729b20e9fcf45c6a814f18e7@linux-foundation.org> <20170730221659.GA28031@bbox> <20170731071707.GA16299@lst.de> <20170731073647.GA26199@bbox> <20170731074206.GA16706@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170731074206.GA16706@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 31, 2017 at 09:42:06AM +0200, Christoph Hellwig wrote: > On Mon, Jul 31, 2017 at 04:36:47PM +0900, Minchan Kim wrote: > > Do you suggest define something special flag(e.g., SWP_INMEMORY) > > for in-memory swap to swap_info_struct when swapon time manually > > or from bdi_queue_someting automatically? > > And depending the flag of swap_info_struct, use the onstack bio > > instead of dynamic allocation if the swap device is in-memory? > > Currently swap always just does I/O on a single page as far > as I can tell, so it can always just use an on-stack bio and > biovec. That's for synchronous I/O, aka reads of course. For writes you'll need to do a dynamic allocation if they are asynchronous. But yes, if we want to force certain devices to be synchronous we'll need a flag for that.