lkml.org 
[lkml]   [2008]   [Feb]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 16 Feb 2008 11:22:18 -0800 (PST)
FromChristoph Lameter <>
SubjectRe: [patch 3/6] mmu_notifier: invalidate_page callbacks
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/

\
 
 \ /
  Last update: 2008-02-16 20:25    [from the cache]
©2003-2008