* [uml-devel] uml, ptrace, and BKL @ 2004-09-18 0:23 Adam Heath 2004-09-18 3:30 ` Jeff Dike 0 siblings, 1 reply; 6+ messages in thread From: Adam Heath @ 2004-09-18 0:23 UTC (permalink / raw) To: user-mode-linux-devel So, LWN had an article this week in their kernel section about parts of the kernel still using the BKL. I did a little grepping, and to my surprise, sys_ptrace() uses the BKL. What this means to UML, is that there is an upper-bounds on how many instances can be on a server at once. BKL also keeps preemption from occuring. If someone were to look into that, UML could be sped up quite a bit, I am thinking. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml, ptrace, and BKL 2004-09-18 0:23 [uml-devel] uml, ptrace, and BKL Adam Heath @ 2004-09-18 3:30 ` Jeff Dike 2004-09-18 2:30 ` Adam Heath 0 siblings, 1 reply; 6+ messages in thread From: Jeff Dike @ 2004-09-18 3:30 UTC (permalink / raw) To: Adam Heath; +Cc: user-mode-linux-devel On Fri, Sep 17, 2004 at 07:23:01PM -0500, Adam Heath wrote: > What this means to UML, is that there is an upper-bounds on how many instances > can be on a server at once. BKL also keeps preemption from occuring. Please. UML is a normal process. It can't do anything to prevent preemption. You're conflating the UML BKL and host BKL. They're two separate things. Jeff ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml, ptrace, and BKL 2004-09-18 3:30 ` Jeff Dike @ 2004-09-18 2:30 ` Adam Heath 2004-09-18 13:18 ` Jeff Dike 0 siblings, 1 reply; 6+ messages in thread From: Adam Heath @ 2004-09-18 2:30 UTC (permalink / raw) To: Jeff Dike; +Cc: user-mode-linux-devel On Fri, 17 Sep 2004, Jeff Dike wrote: > On Fri, Sep 17, 2004 at 07:23:01PM -0500, Adam Heath wrote: > > What this means to UML, is that there is an upper-bounds on how many instances > > can be on a server at once. BKL also keeps preemption from occuring. > > Please. UML is a normal process. It can't do anything to prevent preemption. > > You're conflating the UML BKL and host BKL. They're two separate things. No, I'm not. UML ptraces it's children, to do it's emulation. However, only one UML tracing thread can be doing a ptrace of one of it's children at a time. If there are 50 UML instances running on the host, then that BKL inside sys_ptrace is a bottleneck. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml, ptrace, and BKL 2004-09-18 2:30 ` Adam Heath @ 2004-09-18 13:18 ` Jeff Dike 2004-09-18 18:20 ` Adam Heath 0 siblings, 1 reply; 6+ messages in thread From: Jeff Dike @ 2004-09-18 13:18 UTC (permalink / raw) To: Adam Heath; +Cc: user-mode-linux-devel On Fri, Sep 17, 2004 at 09:30:53PM -0500, Adam Heath wrote: > No, I'm not. > > UML ptraces it's children, to do it's emulation. However, only one UML > tracing thread can be doing a ptrace of one of it's children at a time. If > there are 50 UML instances running on the host, then that BKL inside > sys_ptrace is a bottleneck. OK, just your comment on preemption was a bit strange. You're still wrong, just for different reasons. The scalability of a lock depends on the number of processors on the system, not the number of processes. So, for a given host, increasing the number of UMLs on the system won't increase the pressure on the BKL, assuming that number is greater than the number of processors. And in any case, on a UP system, there is no BKL. Increasing the number of processors will increase the pressure on the BKL, again assuming there are more UMLs than processors. So, 50 UMLs on a 2P system won't be a problem, but 50 UMLs on a 50P system could be. The UML systems that I am aware of are 2P, at most. I think that it is generally OK to run with the entire kernel under the BKL with 2 processors. This being the case, it follows that ptrace won't be an issue either. Also, the ptrace paths are pretty short. Get in, copy a small amount of data or change some state of the child, and get out. On a 2P system, I have a hard time seeing that being a bottleneck. However, it would be interesting to see if UML is causing lock contention anywhere. Running lockmeter on an SMP box running UMLs would show if there's any problems. Jeff ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml, ptrace, and BKL 2004-09-18 13:18 ` Jeff Dike @ 2004-09-18 18:20 ` Adam Heath 2004-09-18 20:50 ` Jeff Dike 0 siblings, 1 reply; 6+ messages in thread From: Adam Heath @ 2004-09-18 18:20 UTC (permalink / raw) To: Jeff Dike; +Cc: user-mode-linux-devel On Sat, 18 Sep 2004, Jeff Dike wrote: > The scalability of a lock depends on the number of processors on the system, > not the number of processes. So, for a given host, increasing the number of > UMLs on the system won't increase the pressure on the BKL, assuming that > number is greater than the number of processors. And in any case, on a UP > system, there is no BKL. This is true(and something I hadn't considered). But with preemption, it's possible for multiple threads to be running in the kernel(as I understand it). However, yes, ptrace paths should be rather short, so the chances for lock contention to occur are most likely small. > However, it would be interesting to see if UML is causing lock contention > anywhere. Running lockmeter on an SMP box running UMLs would show if there's > any problems. Same for a preemptible box. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml, ptrace, and BKL 2004-09-18 18:20 ` Adam Heath @ 2004-09-18 20:50 ` Jeff Dike 0 siblings, 0 replies; 6+ messages in thread From: Jeff Dike @ 2004-09-18 20:50 UTC (permalink / raw) To: Adam Heath; +Cc: user-mode-linux-devel On Sat, Sep 18, 2004 at 01:20:39PM -0500, Adam Heath wrote: > This is true(and something I hadn't considered). But with preemption, it's > possible for multiple threads to be running in the kernel(as I understand it). That's true in any case. The difference with preemption is that a thread can be preempted involuntarily when it's in the kernel. This doesn't really change anything with locking, especially the BKL. That's automatically dropped when a thread calls schedule(), so that if a thread was preempted while holding the BKL, it will drop it during the context switch. > Same for a preemptible box. Again, lock contention only really becomes an issue with lots of processors. So, you may see some contention on a 2P box, but in order for it to be a real problem, you'll probably need a lot more. Jeff ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-18 19:45 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-09-18 0:23 [uml-devel] uml, ptrace, and BKL Adam Heath 2004-09-18 3:30 ` Jeff Dike 2004-09-18 2:30 ` Adam Heath 2004-09-18 13:18 ` Jeff Dike 2004-09-18 18:20 ` Adam Heath 2004-09-18 20:50 ` Jeff Dike
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.