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 18:50:17 +0400 Message-ID: <8acda98c0910070750x6428b96fgdeee5946d1408888@mail.gmail.com> References: <8acda98c0910070338n7220fdabo8c7f8f9e7d21ef6c@mail.gmail.com> <20091007111454.GB15936@localhost> <8acda98c0910070437g1498f99eua9a5ad71e6c2bae4@mail.gmail.com> <20091007132924.GB20855@localhost> <20091007134254.GA26244@localhost> <20091007142054.GA6798@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 qw-out-2122.google.com ([74.125.92.24]:39501 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753937AbZJGO4c convert rfc822-to-8bit (ORCPT ); Wed, 7 Oct 2009 10:56:32 -0400 Received: by qw-out-2122.google.com with SMTP id 3so1878346qwe.37 for ; Wed, 07 Oct 2009 07:55:25 -0700 (PDT) In-Reply-To: <20091007142054.GA6798@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 2009/10/7 Wu Fengguang : [...] > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (bdi_cap_writeback_dirty(mapping->ba= cking_dev_info) && > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 !mapping->a_ops->writepages) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 wbc.range_start =3D (pa= ge->index + 1) << PAGE_CACHE_SHIFT; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 wbc.nr_to_write =3D LUM= PY_PAGEOUT_PAGES - 1; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 generic_writepages(mapp= ing, &wbc); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 iput(inode); I am afraid calling iput() from within pageout code is not generally safe: it can trigger a lot of file system activity (think open-unlinked file) that is not supposed to happen in the direct-reclaim context. Limiting pageout clustering to kswapd might be a better idea---this would improve direct-reclaim latency too, but still, file systems are not designed for re-entrant calls to iput(). 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