lkml.org 
[lkml]   [1999]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] shm bug introduced with pagecache in 2.3.11
Linus Torvalds wrote:
> I was planning on just depending on the sanity of the page cache on this
^^^^^^^^^
> one.
page cache or page tables?
if you want to rely on the page table, then pmd_alloc() and pte_alloc()
could become a problem.

> Basically we have two cases:
> - paging in something new ("no_page"), for which the final test is just
> to test that the page table is still zero (ie we don't even need to
> save any "original" value).
> - paging in something old ("swap_page"), in wich case the final test is
> to check that the pte is still the same as swp_entry_to_pte(entry).
>

Or: we define a new value SWP_LOADING (eg SWP_ENTRY(1,0).
if the pte entry is SWP_LOADING, then we just sleep.
otherwise, we replace the pte with SWP_LOADING, do the actual io, and
wake-up all other threads that are waiting.

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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