From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Danilov Subject: Re: [PATCH 30/45] vmscan: lumpy pageout Date: Wed, 7 Oct 2009 15:37:35 +0400 Message-ID: <8acda98c0910070437g1498f99eua9a5ad71e6c2bae4@mail.gmail.com> References: <8acda98c0910070338n7220fdabo8c7f8f9e7d21ef6c@mail.gmail.com> <20091007111454.GB15936@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Andrew Morton , Theodore Tso , Christoph Hellwig , Dave Chinner , Chris Mason , Peter Zijlstra , "Li, Shaohua" , Myklebust Trond , "jens.axboe@oracle.com" , Jan Kara , Nick Piggin , "linux-fsdevel@vger.kernel.org" To: Wu Fengguang Return-path: Received: from mail-qy0-f173.google.com ([209.85.221.173]:58735 "EHLO mail-qy0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758932AbZJGLiM convert rfc822-to-8bit (ORCPT ); Wed, 7 Oct 2009 07:38:12 -0400 Received: by qyk3 with SMTP id 3so4226004qyk.4 for ; Wed, 07 Oct 2009 04:37:36 -0700 (PDT) In-Reply-To: <20091007111454.GB15936@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 2009/10/7 Wu Fengguang : > On Wed, Oct 07, 2009 at 06:38:37PM +0800, Nikita Danilov wrote: >> Hello, >> [...] > > Glad to know about your experiences :) Interestingly I started with > ->writepage() and then switch to ->writepages() because filesystems > behave better with the latter (i.e. less file fragmentation). By the way, why is your patch doing ->writepage(page->index); generic_writepages(page->index + 1, LUMPY_PAGEOUT_PAGES - 1); instead of generic_writepages(page->index, LUMPY_PAGEOUT_PAGES); ? Is this because of the difficulties with passing back page specific errors from generic_writepages()? > > I'd like to just ignore the shmem case, by adding a > bdi_cap_writeback_dirty() check. Because clustered writing to swap > device may be a less gain. Or you can just call try_to_unmap() from shmem_writepage() when wbc->for_reclaim is true. > > Page filtering should also be possible in write_cache_pages(). =A0But > what do you mean by "hard-to-fix races against inode reclamation"? vmscan.c pageout path doesn't take a reference on inode, so the instant ->writepage() releases lock on the page, the inode can be freed. > > Thanks, > Fengguang > Thank you, Nikita. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html