Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758107AbYBPTW2 (ORCPT ); Sat, 16 Feb 2008 14:22:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755019AbYBPTWU (ORCPT ); Sat, 16 Feb 2008 14:22:20 -0500 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:57540 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751597AbYBPTWT (ORCPT ); Sat, 16 Feb 2008 14:22:19 -0500 Date: Sat, 16 Feb 2008 11:22:18 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andrew Morton cc: Andrea Arcangeli , Robin Holt , Avi Kivity , Izik Eidus , kvm-devel@lists.sourceforge.net, Peter Zijlstra , general@lists.openfabrics.org, Steve Wise , Roland Dreier , Kanoj Sarcar , steiner@sgi.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, daniel.blueman@quadrics.com Subject: Re: [patch 3/6] mmu_notifier: invalidate_page callbacks In-Reply-To: <20080215193736.9d6e7da3.akpm@linux-foundation.org> Message-ID: References: <20080215064859.384203497@sgi.com> <20080215064932.918191502@sgi.com> <20080215193736.9d6e7da3.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1310 Lines: 33 On Fri, 15 Feb 2008, Andrew Morton wrote: > > @@ -287,7 +288,8 @@ static int page_referenced_one(struct pa > > if (vma->vm_flags & VM_LOCKED) { > > referenced++; > > *mapcount = 1; /* break early from loop */ > > - } else if (ptep_clear_flush_young(vma, address, pte)) > > + } else if (ptep_clear_flush_young(vma, address, pte) | > > + mmu_notifier_age_page(mm, address)) > > referenced++; > > The "|" is obviously deliberate. But no explanation is provided telling us > why we still call the callback if ptep_clear_flush_young() said the page > was recently referenced. People who read your code will want to understand > this. Andrea? > > flush_cache_page(vma, address, pte_pfn(*pte)); > > entry = ptep_clear_flush(vma, address, pte); > > + mmu_notifier(invalidate_page, mm, address); > > I just don't see how ths can be done if the callee has another thread in > the middle of establishing IO against this region of memory. > ->invalidate_page() _has_ to be able to block. Confused. The page lock is held and that holds off I/O? -- 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/