From: Raymond Jennings <shentino@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Oleg Nesterov <oleg@redhat.com>,
Vladimir Davydov <vdavydov@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
Markus Trippelsdorf <markus@trippelsdorf.de>,
Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>,
Ralf-Peter Rohbeck <Ralf-Peter.Rohbeck@quantum.com>,
Jiri Slaby <jslaby@suse.com>, Olaf Hering <olaf@aepfle.de>,
Joonsoo Kim <js1304@gmail.com>, linux-mm <linux-mm@kvack.org>
Subject: Re: More OOM problems (sorry fro the mail bomb)
Date: Thu, 29 Sep 2016 13:08:24 -0700 [thread overview]
Message-ID: <1475179704.7681.0@smtp.gmail.com> (raw)
In-Reply-To: <f35c1c03-c1ef-e4fb-44c8-187b75180130@suse.cz>
On Thu, Sep 29, 2016 at 12:03 AM, Vlastimil Babka <vbabka@suse.cz>
wrote:
> On 09/29/2016 08:12 AM, Raymond Jennings wrote:
>> On Wed, 21 Sep 2016 00:04:58 -0700
>> Raymond Jennings <shentino@gmail.com> 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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-09-29 20:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-18 20:03 More OOM problems Linus Torvalds
2016-09-18 20:26 ` Lorenzo Stoakes
2016-09-18 20:58 ` Linus Torvalds
2016-09-18 21:13 ` Vlastimil Babka
2016-09-18 21:34 ` Lorenzo Stoakes
2016-09-19 8:32 ` Michal Hocko
2016-09-19 8:42 ` Lorenzo Stoakes
2016-09-19 8:53 ` Michal Hocko
2016-09-25 21:48 ` Lorenzo Stoakes
2016-09-26 7:48 ` Michal Hocko
2016-09-18 21:00 ` Vlastimil Babka
2016-09-18 21:18 ` Linus Torvalds
2016-09-19 6:27 ` Jiri Slaby
2016-09-19 7:01 ` Michal Hocko
2016-09-19 7:52 ` Michal Hocko
2016-09-19 1:07 ` Andi Kleen
[not found] ` <alpine.DEB.2.20.1609190836540.12121@east.gentwo.org>
2016-09-19 14:31 ` Andi Kleen
2016-09-19 14:39 ` Michal Hocko
2016-09-19 14:41 ` Vlastimil Babka
2016-09-19 18:18 ` Linus Torvalds
2016-09-19 19:57 ` Christoph Lameter
2016-09-18 22:00 ` Vlastimil Babka
2016-09-19 6:56 ` Michal Hocko
2016-09-19 6:48 ` Michal Hocko
2016-09-21 7:04 ` Raymond Jennings
2016-09-21 7:29 ` Michal Hocko
2016-09-29 6:12 ` More OOM problems (sorry fro the mail bomb) Raymond Jennings
2016-09-29 7:03 ` Vlastimil Babka
2016-09-29 20:08 ` Raymond Jennings [this message]
2016-09-29 21:20 ` Vlastimil Babka
2016-09-30 19:48 ` Raymond Jennings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475179704.7681.0@smtp.gmail.com \
--to=shentino@gmail.com \
--cc=Ralf-Peter.Rohbeck@quantum.com \
--cc=a.miskiewicz@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=js1304@gmail.com \
--cc=jslaby@suse.com \
--cc=linux-mm@kvack.org \
--cc=markus@trippelsdorf.de \
--cc=mhocko@kernel.org \
--cc=olaf@aepfle.de \
--cc=oleg@redhat.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
--cc=vdavydov@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).