Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2007 17:05:57 -0700 (PDT)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        arch@freebsd.org
Subject:   Changing p_swtime and td_slptime to ticks
Message-ID:  <20070917165657.B558@10.0.0.1>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-2003406049-1190073957=:558
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

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.

In 4BSD these two variables are increment once per-second as schedcpu() 
iterates over all threads.  ULE does not have a once per-second loop 
iterating over all threads.  So I have changed p_swtime to p_swtick and 
td_slptime to td_slptick.  These record the value of 'ticks' when the 
thread slept or was last swapped in or out.

For backwards compatibility I leave the values in kinfo_proc with the 
legacy meaning by subtracting from ticks and dividing by hz.  I perform a 
similar transformation in the swapout code to convert to seconds.  This 
change does make it possible to use sub-second granular decisions in the 
swap code, however I'm not sure if that's really necessary.

So that I did not disturb the 4BSD mechanism I kept the original 
td_slptime in the td_sched area.  It should be possible to use td_slptick 
directly but especially this close to release I did not want to change 
4BSD.

Feedback and testing welcome.

Thanks,
Jeff
--0-2003406049-1190073957=:558
Content-Type: TEXT/x-diff; charset=US-ASCII; name=swap2.diff
Content-Transfer-Encoding: BASE64
Content-ID: <20070917170557.P558@10.0.0.1>
Content-Description: 
Content-Disposition: attachment; filename=swap2.diff

SW5kZXg6IGxpYi9saWJrdm0va3ZtX3Byb2MuYw0KPT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PQ0KUkNTIGZpbGU6IC9ob21lL25jdnMvc3JjL2xpYi9saWJrdm0v
a3ZtX3Byb2MuYyx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuOTMNCmRpZmYg
LXUgLXAgLXI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iAJcC0+cF9mbGFnICY9IH5QX1NXQVBQSU5HT1VUOw0KIAlQ
Uk9DX1NMT0NLKHApOw0KLQlwLT5wX3N3dGltZSA9IDA7DQorCXAtPnBfc3d0
aWNrID0gdGlja3M7DQogCXJldHVybiAoMCk7DQogfQ0KICNlbmRpZiAvKiAh
Tk9fU1dBUFBJTkcgKi8NCg==

--0-2003406049-1190073957=:558--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070917165657.B558>