* Re: vmscan.c heuristic adjustment for smaller systems @ 2004-04-18 17:48 Marc Singer 0 siblings, 0 replies; 3+ messages in thread From: Marc Singer @ 2004-04-18 17:48 UTC (permalink / raw) To: linux-mm > Might be worth reading my thread on linux-mm about this and commenting? > (hint hint) Did you start a thread about this? I'm not seeing it. On Sun, Apr 18, 2004 at 10:29:47AM +0100, Russell King wrote: > On Sat, Apr 17, 2004 at 05:23:43PM -0700, Marc Singer wrote: > > All of these tests are performed at the console, one command at a > > time. I have a telnet daemon available, so I open a second connection > > to the target system. I run a continuous loop of file copies on the > > console and I execute 'ls -l /proc' in the telnet window. It's a > > little slow, but it isn't unreasonable. Hmm. I then run the copy > > command in the telnet window followed by the 'ls -l /proc'. It works > > fine. I logout of the console session and perform the telnet window > > test again. The 'ls -l /proc takes 30 seconds. > > > > When there is more than one process running, everything is peachy. > > When there is only one process (no context switching) I see the slow > > performance. I had a hypothesis, but my test of that hypothesis > > failed. > > Guys, this tends to indicate that we _must_ have up to date aging > information from the PTE - if not, we're liable to miss out on the > pressure from user applications. The "lazy" method which 2.4 will > allow is not possible with 2.6. > > This means we must flush the TLB when we mark the PTE old. That has been my hypothesis all along. But I have failed to prove it to myself. Please steer me if I've missed your point about flushing TLB entries when we age PTEs. As you recall, I was originally concerned that clearing hardware PTEs without flushing the related TLB entries was causing my crash. You corrected my misunderstanding and the then we found the real culprit. However, we discussed whether or not it was desirable to always flush TLBs when aging PTEs instead of being lazy about it as the kernel now is. So, I tried this. Since I don't know the virtual address for a PTE in the set_pte() routine, I changed it to flush the whole TLB whenever it sets a hardware PTE entry to zero. Yet, I still get the slow-down behavior. I also changed the TLB flush routines to always do a complete TLB flush instead of flushing individual entries. Still, no change in the slow-down. So, if my slow-down is related to lazy TLB flushing then I am at a loss to explain how. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20040418174743.GC28744@flea>]
[parent not found: <20040418175324.GB743@holomorphy.com>]
* Re: vmscan.c heuristic adjustment for smaller systems [not found] ` <20040418175324.GB743@holomorphy.com> @ 2004-04-18 18:06 ` Marc Singer 2004-04-18 19:05 ` William Lee Irwin III 0 siblings, 1 reply; 3+ messages in thread From: Marc Singer @ 2004-04-18 18:06 UTC (permalink / raw) To: linux-mm On Sun, Apr 18, 2004 at 10:53:24AM -0700, William Lee Irwin III wrote: > On Sun, Apr 18, 2004 at 10:47:44AM -0700, Marc Singer wrote: > > That has been my hypothesis all along. But I have failed to prove it > > to myself. Please steer me if I've missed your point about flushing > > TLB entries when we age PTEs. > > Well, there's a point of some kind to it. I don't think I understand what you mean. > On Sun, Apr 18, 2004 at 10:47:44AM -0700, Marc Singer wrote: > > So, I tried this. Since I don't know the virtual address for a PTE in > > the set_pte() routine, I changed it to flush the whole TLB whenever it > > sets a hardware PTE entry to zero. Yet, I still get the slow-down > > behavior. I also changed the TLB flush routines to always do a > > complete TLB flush instead of flushing individual entries. Still, no > > change in the slow-down. > > Actually ptep_to_address() should find the uvaddr for you. The set_pte function is assembler coded. For a proof of concept, I am willing to be blunt. > On Sun, Apr 18, 2004 at 10:47:44AM -0700, Marc Singer wrote: > > So, if my slow-down is related to lazy TLB flushing then I am at a > > loss to explain how. > > I'm not going to tell ou what your results are. Perhaps, though, this isn't such a bad result. It could mean that the lazy TLB flush is OK and that my bug is something different. Or, it could mean that I'm still doing the flush incorrectly and that that is the correct solution were it done right. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vmscan.c heuristic adjustment for smaller systems 2004-04-18 18:06 ` Marc Singer @ 2004-04-18 19:05 ` William Lee Irwin III 0 siblings, 0 replies; 3+ messages in thread From: William Lee Irwin III @ 2004-04-18 19:05 UTC (permalink / raw) To: Marc Singer; +Cc: linux-mm On Sun, Apr 18, 2004 at 10:53:24AM -0700, William Lee Irwin III wrote: >> Well, there's a point of some kind to it. On Sun, Apr 18, 2004 at 11:06:14AM -0700, Marc Singer wrote: > I don't think I understand what you mean. Feeding the replacement heuristics better input tends to get better results, or something on that order. On Sun, Apr 18, 2004 at 10:53:24AM -0700, William Lee Irwin III wrote: >> Actually ptep_to_address() should find the uvaddr for you. On Sun, Apr 18, 2004 at 11:06:14AM -0700, Marc Singer wrote: > The set_pte function is assembler coded. For a proof of concept, I am > willing to be blunt. If you're stuck examining struct page you might want to keep it in C for a while. On Sun, Apr 18, 2004 at 10:53:24AM -0700, William Lee Irwin III wrote: >> I'm not going to tell ou what your results are. On Sun, Apr 18, 2004 at 11:06:14AM -0700, Marc Singer wrote: > Perhaps, though, this isn't such a bad result. It could mean that the > lazy TLB flush is OK and that my bug is something different. Or, it > could mean that I'm still doing the flush incorrectly and that that is > the correct solution were it done right. Was this the one-liner in vmscan.c from earlier? -- wli -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-04-18 19:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-18 17:48 vmscan.c heuristic adjustment for smaller systems Marc Singer
[not found] <20040418174743.GC28744@flea>
[not found] ` <20040418175324.GB743@holomorphy.com>
2004-04-18 18:06 ` Marc Singer
2004-04-18 19:05 ` William Lee Irwin III
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox