From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756832AbYJEXHs (ORCPT ); Sun, 5 Oct 2008 19:07:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755410AbYJEXHj (ORCPT ); Sun, 5 Oct 2008 19:07:39 -0400 Received: from casper.infradead.org ([85.118.1.10]:34632 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755397AbYJEXHi (ORCPT ); Sun, 5 Oct 2008 19:07:38 -0400 Date: Sun, 5 Oct 2008 16:07:24 -0700 From: Arjan van de Ven To: Mikulas Patocka Cc: Andrew Morton , linux-kernel@vger.kernel.org, agk@redhat.com, mbroz@redhat.com, chris@arachsys.com Subject: Re: [PATCH 2/3] Fix fsync livelock Message-ID: <20081005160724.54dd1a27@infradead.org> In-Reply-To: References: <20080911101616.GA24064@agk.fab.redhat.com> <20080923154905.50d4b0fa.akpm@linux-foundation.org> <20080923164623.ce82c1c2.akpm@linux-foundation.org> <20081001225404.4e973465.akpm@linux-foundation.org> <20081005153306.7e644c9f@infradead.org> Organization: Intel X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 5 Oct 2008 19:02:57 -0400 (EDT) Mikulas Patocka wrote: > > are you sure? > > isn't the right fix to just walk the file pages only once? > > It walks the pages only once --- and waits on each on them. But > because new pages are contantly appearing under it, that "walk only > once" becomes infinite loop (well, finite, until the whole disk is > written). well. fsync() promises that everything that's dirty at the time of the call will hit the disk. That is not something you can compromise. The only way out would be is to not allow new dirty during an fsync()... which is imo even worse. Submit them all in one go, then wait, should not be TOO bad. Unless a lot was dirty already, but then you go back to "but it has to go to disk". -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org