* swapout vs. filemap_sync_pte...?
@ 2000-11-07 0:00 Jeff Garzik
2000-11-07 23:06 ` Alexander Viro
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2000-11-07 0:00 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Linus Torvalds, viro
The address_space::writepage callback is called from try_to_swap_out()
path, and also from the filemap_sync_pte() path. There appears to be no
way to tell the difference between the two callers. This is not good
because the semantics are very different: "sync this page" versus "page
is going away".
Should address_space::writepage get passed an additional arg, indicating
the caller?
Should filemap_sync_pte call address_space::sync_page instead of
::writepage?
Either way, this allows the writepage function to know whether it really
needs to store the page, because it is going away, or not.
I will admit I might be missing something obvious... I'm pretty new to
this part of the code.
Jeff
--
Jeff Garzik | "When I do this, my computer freezes."
Building 1024 | -user
MandrakeSoft | "Don't do that."
| -level 1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: swapout vs. filemap_sync_pte...?
2000-11-07 0:00 swapout vs. filemap_sync_pte...? Jeff Garzik
@ 2000-11-07 23:06 ` Alexander Viro
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Viro @ 2000-11-07 23:06 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linux Kernel Mailing List, Linus Torvalds
On Mon, 6 Nov 2000, Jeff Garzik wrote:
> The address_space::writepage callback is called from try_to_swap_out()
> path, and also from the filemap_sync_pte() path. There appears to be no
> way to tell the difference between the two callers. This is not good
> because the semantics are very different: "sync this page" versus "page
> is going away".
For the filemap VMAs (i.e. ones that are based on address_space with
backstore) it is the same thing. For something like tmpfs you have
different VMA-level semantics. Ergo, different VMA methods. They can
be shared with filemap ones, but you definitely don't want ->vm_ops->sync().
End of the problem...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-11-07 23:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-07 0:00 swapout vs. filemap_sync_pte...? Jeff Garzik
2000-11-07 23:06 ` Alexander Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox