From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx126.postini.com [74.125.245.126]) by kanga.kvack.org (Postfix) with SMTP id 5BD526B0023 for ; Mon, 28 Jan 2013 18:58:06 -0500 (EST) Date: Tue, 29 Jan 2013 08:58:04 +0900 From: Minchan Kim Subject: Re: [PATCHv3 3/6] mm: break up swap_writepage() for frontswap backends Message-ID: <20130128235804.GF4752@blaptop> References: <1359409767-30092-1-git-send-email-sjenning@linux.vnet.ibm.com> <1359409767-30092-4-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-4-git-send-email-sjenning@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: 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 On Mon, Jan 28, 2013 at 03:49:24PM -0600, Seth Jennings wrote: > swap_writepage() is currently where frontswap hooks into the swap > write path to capture pages with the frontswap_store() function. > However, if a frontswap backend wants to "resume" the writeback of > a page to the swap device, it can't call swap_writepage() as > the page will simply reenter the backend. > > This patch separates swap_writepage() into a top and bottom half, the > bottom half named __swap_writepage() to allow a frontswap backend, > like zswap, to resume writeback beyond the frontswap_store() hook. > > __add_to_swap_cache() is also made non-static so that the page for > which writeback is to be resumed can be added to the swap cache. > > Signed-off-by: Seth Jennings Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- 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