RE: [patch 2/8] mm: vmscan: disregard swappiness shortly beforegoing OOM
From: Satoru Moriya
Date: Fri Dec 14 2012 - 14:45:17 EST
On 12/14/2012 03:37 AM, Michal Hocko wrote:
> On Thu 13-12-12 23:50:30, Johannes Weiner wrote:
>> On Thu, Dec 13, 2012 at 10:25:43PM +0000, Satoru Moriya wrote:
>>>
>>> I introduced swappiness check here with fe35004f because, in some
>>> cases, we prefer OOM to swap out pages to detect problems as soon as
>>> possible. Basically, we design the system not to swap out and so if
>>> it causes swapping, something goes wrong.
>>
>> I might be missing something terribly obvious, but... why do you add
>> swap space to the system in the first place? Or in case of cgroups,
>> why not set the memsw limit equal to the memory limit?
>
> I can answer the later. Because memsw comes with its price and
> swappiness is much cheaper. On the other hand it makes sense that
> swappiness==0 doesn't swap at all. Or do you think we should get back
> to _almost_ doesn't swap at all?
>
Right. One of the reason is what Michal described above and another
reason that I thought is softlimit. softlimit reclaim always works
with priority=0. Therefore, if we set softlimit to one memcg without
swappiness=0, the kernel scans both anonymous and filebacked pages
during soft limit reclaim for the memcg and reclaims them.
Regards,
Satoru
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/