On Thu, Sep 29, 2016 at 12:03 AM, Vlastimil Babka <vbabka@xxxxxxx>
wrote:
On 09/29/2016 08:12 AM, Raymond Jennings wrote:
On Wed, 21 Sep 2016 00:04:58 -0700
Raymond Jennings <shentino@xxxxxxxxx> wrote:
I would like to apologize to everyone for the mailbombing. Something
went screwy with my email client and I had to bitchslap my
installation
when I saw my gmail box full of half-composed messages being sent
out.
FWIW, I apparently didn't receive any.
Trying geary this time, keeping my fingers crossed
For the curious, by the by, how does kcompactd work? Does it just
get
run on request or is it a continuous background process akin to
khugepaged? Is there a way to keep it running in the background
defragmenting on a continuous trickle basis?
Right now it gets run on request. Kswapd is woken up when watermarks
get between "min" and "low" and when it finishes reclaim and it was a
high-order request, it wakes up kcompactd, which compacts until page
of given order is available. That mimics how it was before when
kswapd did the compaction itself, but I know it's not ideal and plan
to make kcompactd more proactive.
Suggestion:
1. Make it a background process "kcompactd"
2. It is activated/woke up/semaphored awake any time a page is freed.
3. Once it is activated, it enters a loop:
3.1. Reset the semaphore.
3.2. Once a cycle, it takes the highest movable page
3.3. It then finds the lowest free page
3.4. Then, it migrates the highest used page to the lowest free space
3.5. maybe pace itself by sleeping for a teensy, then go back to step
3.2
3.6. Do one page at a time to keep it neatly interruptible and keep it
from blocking other stuff. Since compaction is a housekeeping task, it
should probably be eager to yield to other things.
3.7. Probably leave hugepages alone if detected since they are by
definition fairly defragmented already.
4. Once all gaps are backfilled, go back to sleep and park back at
step 2 waiting for the next wakeup.
Would this be a good way to do it?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>