[lkml]   [2003]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Properly implement flush_dcache_page in 2.4? (Or is it possible?)
On Fri, May 30, 2003 at 04:00:02PM -0700, Jun Sun wrote:
> Is this routine tested to be working? At least passing a page
> index as a full virtual address to flush_cache_page() looks suspicious.

Well, given that it doesn't actually trip up any real life programs
(for me) its not that easy to say "yes, it works". However, you are
correct, and the right flush_cache_page() call should be:

flush_cache_page(mpnt, mpnt->vm_start + off << PAGE_SHIFT);

> In addition, I am not sure if the vma struct will show up in the
> "shared" list _if_ the page is only mapped in one user process and
> in kernel (for example, those pages you obtain through get_user_pages()
> call).

If a mapping is using MAP_SHARED, my understanding is that the pages should
appear on the i_mmap_shared list.

I don't see a reason to worry about privately mapped pages on the i_mmap
list since they are private, and therefore shouldn't be updated with
modifications to other mappings, which I'd have thought would include
writes to the file (although I'm not so sure atm.)

Russell King ( The developer of ARM Linux

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:0.052 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site