Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753770AbYAWTzw (ORCPT ); Wed, 23 Jan 2008 14:55:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751960AbYAWTzo (ORCPT ); Wed, 23 Jan 2008 14:55:44 -0500 Received: from fxip-0047f.externet.hu ([88.209.222.127]:45820 "EHLO pomaz-ex.szeredi.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbYAWTzn (ORCPT ); Wed, 23 Jan 2008 14:55:43 -0500 To: torvalds@linux-foundation.org CC: a.p.zijlstra@chello.nl, salikhmetov@gmail.com, linux-mm@kvack.org, jakob@unthought.net, linux-kernel@vger.kernel.org, valdis.kletnieks@vt.edu, riel@redhat.com, ksm@42.dk, staubach@redhat.com, jesper.juhl@gmail.com, akpm@linux-foundation.org, protasnb@gmail.com, miklos@szeredi.hu, r.e.wolff@bitwizard.nl, hidave.darkstar@gmail.com, hch@infradead.org In-reply-to: (message from Linus Torvalds on Wed, 23 Jan 2008 11:35:21 -0800 (PST)) Subject: Re: [PATCH -v8 3/4] Enable the MS_ASYNC functionality in sys_msync() References: <12010440803930-git-send-email-salikhmetov@gmail.com> <1201044083504-git-send-email-salikhmetov@gmail.com> <1201110066.6341.65.camel@lappy> Message-Id: From: Miklos Szeredi Date: Wed, 23 Jan 2008 20:55:34 +0100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 36 > > > > It would need some addition piece to not call msync_interval() for > > MS_SYNC, and remove the balance_dirty_pages_ratelimited_nr() stuff. > > > > But yeah, this pte walker is much better. > > Actually, I think this patch is much better. > > Anyway, it's better because: > - it actually honors the range > - it uses the same code for MS_ASYNC and MS_SYNC > - it just avoids doing the "wait for" for MS_ASYNC. > > However, it's totally untested, of course. What did you expect? Clean code > _and_ testing? > > [ Side note: it is quite possible that we should not do the > SYNC_FILE_RANGE_WAIT_BEFORE on MS_ASYNC, and just skip over pages that > are busily under writeback already. MS_ASYNC is not supposed to wait, so SYNC_FILE_RANGE_WAIT_BEFORE probably should not be used in that case. What would be perfect, is if we had a sync mode, that on encountering a page currently under writeback, would just do a page_mkclean() on it, so we still receive a page fault next time one of the mappings is dirtied, so the times can be updated. Would there be any difficulties with that? Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/