Re: rusage breakdown and cpu limits.



On Tuesday 29 May 2007 02:01:36 pm Jeff Roberson wrote:
I'm working with Attilio to break down rusage further to be per-thread in
places where it is protected by the global scheduler lock. To support
this, I am interested in moving the rlimit cpulimit check into userret(),
or perhaps ast(). Is there any reason why we need to check this on every
context switch? Any objections to moving it? Eventually it will require
a different lock from the one we obtain to call mi_switch().

I think using a per-process spin lock (or a pool of spin locks) would be a
good first step. I wouldn't do anything more complicated unless the simple
approach doesn't work. The only reason to not move the check into userret()
would be if one is worried about threads chewing up CPU time while they are
in the kernel w/o bouncing out to userland. Also, it matters which one
happens more often (userret() vs mi_switch()). If on average threads perform
multiple system calls during a single time slice (no idea if this is true or
not), then moving the check to userret() would actually hurt performance.

--
John Baldwin
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: rusage breakdown and cpu limits.
    ... The only reason to not move the check into userret() ... In this case, correct proc locking isn't even possible, since the ... the lock must protect at least ... the runtime would accumulate accurately somewhere, ...
    (freebsd-arch)
  • Re: Olympus SP500UZ erratic autofocus
    ... I didn't know about autofocus lock. ... Moving target you need fast focus/exposure setting, fast frames/sec, ... {camera ready to take picture, press OK/MENU, MODE MENU, CAMERA tab, ... EV settings ...
    (rec.photo.digital)
  • Re: How to detect locked files?
    ... and fcntl, assuming the FTP server ... places a write lock on the files it's writing. ... FTP servers may not lock the files they're writing to. ... prevent another process from moving the file to another directory. ...
    (comp.os.linux.misc)
  • RE: Timeout problem when move large number of files
    ... During the delete, SQL Server ... probably escalates the lock to a Table lock, resulting in any other access to ... Moving data around so much does raise a red flag. ... > For better performance at 5 AM, I move all transactions of previous day from ...
    (microsoft.public.sqlserver.programming)
  • Re: Impressive SU-30MK (Russian Fighter Aircraft)
    ... radar lose lock. ... It would see the target wasn't moving in relation to ...
    (rec.aviation.military)