From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <44611DAD.8020801@cyberone.com.au> Date: Wed, 10 May 2006 08:54:37 +1000 From: Nick Piggin MIME-Version: 1.0 Subject: Re: [RFC][PATCH 2/3] throttle writers of shared mappings References: <1146861313.3561.13.camel@lappy> <445CA22B.8030807@cyberone.com.au> <1146922446.3561.20.camel@lappy> <445CA907.9060002@cyberone.com.au> <1146929357.3561.28.camel@lappy> <1147116034.16600.2.camel@lappy> <1147207460.27680.20.camel@lappy> In-Reply-To: <1147207460.27680.20.camel@lappy> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Peter Zijlstra Cc: Christoph Lameter , Linus Torvalds , Andi Kleen , Rohit Seth , Andrew Morton , mbligh@google.com, hugh@veritas.com, riel@redhat.com, andrea@suse.de, arjan@infradead.org, apw@shadowen.org, mel@csn.ul.ie, marcelo@kvack.org, anton@samba.org, paulmck@us.ibm.com, linux-mm List-ID: Peter Zijlstra wrote: >@@ -2304,8 +2308,11 @@ static inline int handle_pte_fault(struc > unlock: > pte_unmap_unlock(pte, ptl); > if (dirty_page) { >+ struct address_space *mapping = page_mapping(dirty_page); > set_page_dirty(dirty_page); > put_page(dirty_page); >+ if (mapping) >+ balance_dirty_pages_ratelimited_nr(mapping, 1); > > Just use balance_dirty_pages() -- 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