Re: Changing p_swtime and td_slptime to ticks
- From: Andre Oppermann <andre@xxxxxxxxxxx>
- Date: Tue, 18 Sep 2007 16:46:21 +0200
Jeff Roberson wrote:
On Mon, 17 Sep 2007, Julian Elischer wrote:
Jeff Roberson wrote:Enclosed is a patch that fixes swapping with ULE. ULE has never properly set p_swtime and td_slptime which are used by the swapout/swapin code to select the appropriate thread to swap.
I have not looked at in the depth required, but 2 points that I was unable
to check to my satisfaction before I got called away for work....
1/ the source of the ticks is a monotonically increasing count that never
goes backwards or changes?
ticks is incremented each time hardclock() is called. That's it.
2/ nothing that used to be accounted in seconds becomes accounted for in ticks?
I scale back to seconds where it is required. Really I think ticks would be the better metric in vm_glue.c but didn't want to make any drastic changes.
ticks is 2^31 on x86 and at HZ=1000 is wraps within a reasonable
short uptime. You have to make sure that your code handles that
correctly or you run into lots of strange effects which are almost
impossible to reproduce. In TCP we've got bitten by that.
--
Andre
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Changing p_swtime and td_slptime to ticks
- From: Jeff Roberson
- Re: Changing p_swtime and td_slptime to ticks
- References:
- Changing p_swtime and td_slptime to ticks
- From: Jeff Roberson
- Re: Changing p_swtime and td_slptime to ticks
- From: Julian Elischer
- Re: Changing p_swtime and td_slptime to ticks
- From: Jeff Roberson
- Changing p_swtime and td_slptime to ticks
- Prev by Date: Re: Understanding interrupted system calls
- Next by Date: Re: Understanding interrupted system calls
- Previous by thread: Re: Changing p_swtime and td_slptime to ticks
- Next by thread: Re: Changing p_swtime and td_slptime to ticks
- Index(es):
Relevant Pages
|
|