From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755878Ab3A2ABR (ORCPT ); Mon, 28 Jan 2013 19:01:17 -0500 Received: from LGEMRELSE1Q.lge.com ([156.147.1.111]:62353 "EHLO LGEMRELSE1Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755799Ab3A2ABO (ORCPT ); Mon, 28 Jan 2013 19:01:14 -0500 X-AuditID: 9c93016f-b7b70ae000000e36-34-510711492569 Date: Tue, 29 Jan 2013 09:01:13 +0900 From: Minchan Kim To: Seth Jennings Cc: Andrew Morton , Greg Kroah-Hartman , Nitin Gupta , Konrad Rzeszutek Wilk , Dan Magenheimer , Robert Jennings , Jenifer Hopper , Mel Gorman , Johannes Weiner , Rik van Riel , Larry Woodman , Benjamin Herrenschmidt , Dave Hansen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Subject: Re: [PATCHv3 4/6] mm: allow for outstanding swap writeback accounting Message-ID: <20130129000113.GG4752@blaptop> References: <1359409767-30092-1-git-send-email-sjenning@linux.vnet.ibm.com> <1359409767-30092-5-git-send-email-sjenning@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1359409767-30092-5-git-send-email-sjenning@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2013 at 03:49:25PM -0600, Seth Jennings wrote: > To prevent flooding the swap device with writebacks, frontswap > backends need to count and limit the number of outstanding > writebacks. The incrementing of the counter can be done before > the call to __swap_writepage(). However, the caller must receive > a notification when the writeback completes in order to decrement > the counter. > > To achieve this functionality, this patch modifies > __swap_writepage() to take the bio completion callback function > as an argument. > > end_swap_bio_write(), the normal bio completion function, is also > made non-static so that code doing the accounting can call it > after the accounting is done. > > Signed-off-by: Seth Jennings Acked-by: Minchan Kim -- Kind regards, Minchan Kim