linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mm/memory.c: Missing pte_mkyoung() on mk_pte() calls?
@ 2001-05-17 20:40 Marcelo Tosatti
  2001-05-17 20:42 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2001-05-17 20:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lkml


Linus,

I was looking at mm/memory.c (2.4), and I've noticed that we don't call
pte_mkyoung() on newly created pte's for most of the fault paths.
break_cow(), for example:

 establish_pte(vma, address, page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, v ma->vm_page_prot))));

Is there any reason why we don't set the young bit on such places ?

I don't think that the window between the pte creation and the actual
access of the pte by the process is always big enough to avoid kswapd (or
other task trying to free memory) from ripping a created pte. 




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mm/memory.c: Missing pte_mkyoung() on mk_pte() calls?
  2001-05-17 20:40 mm/memory.c: Missing pte_mkyoung() on mk_pte() calls? Marcelo Tosatti
@ 2001-05-17 20:42 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2001-05-17 20:42 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lkml


Two seconds after I sent the message Benjamin told me on IRC that
PAGE_ACCESSED is included in the default page protections... duh. 


On Thu, 17 May 2001, Marcelo Tosatti wrote:

> 
> Linus,
> 
> I was looking at mm/memory.c (2.4), and I've noticed that we don't call
> pte_mkyoung() on newly created pte's for most of the fault paths.
> break_cow(), for example:
> 
>  establish_pte(vma, address, page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, v ma->vm_page_prot))));
> 
> Is there any reason why we don't set the young bit on such places ?
> 
> I don't think that the window between the pte creation and the actual
> access of the pte by the process is always big enough to avoid kswapd (or
> other task trying to free memory) from ripping a created pte. 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-17 22:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17 20:40 mm/memory.c: Missing pte_mkyoung() on mk_pte() calls? Marcelo Tosatti
2001-05-17 20:42 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).