On Wed 15-06-22 14:35:22, Christian König wrote:
[...]
Even the classic mm_struct based accounting includes MM_SHMEMPAGES into theYeah, it is nothing really new but it also doesn't mean it is an example
badness. So accounting shared resources as badness to make a decision is
nothing new here.
worth following as this doesn't really work currently. Also please note
that MM_SHMEMPAGES is counting at least something process specific as
those pages are mapped in to the process (and with enough of wishful
thinking unmapping can drop the last reference and free something up
actually) . With generic per-file memory this is even more detached from
process.
The difference is that this time the badness doesn't come from the memoryI am not sure what would be the proper way to control that that would be
management subsystem, but rather from the I/O subsystem.
This is also the reason why I am not really fan of the per fileWould a kernel command line option to control the behavior be helpful here?
badness because it adds a notion of resource that is not process bound
in general so it will add all sorts of weird runtime corner cases which
are impossible to anticipate [*]. Maybe that will work in some scenarios
but definitely not something to be done by default without users opting
into that and being aware of consequences.
future extensible. Kernel command line is certainly and option but if we
want to extend that to module like or eBPF interface then it wouldn't
stand a future test very quickly.