From: Stefan Roesch <shr@devkernel.io>
To: xu xin <xu.xin.sc@gmail.com>
Cc: david@redhat.com, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, hughd@google.com, xu.xin16@zte.com.cn
Subject: Re: [PATCH 0/3] mm/ksm: Support controlling KSM with PID
Date: Tue, 03 Sep 2024 22:31:38 -0700 [thread overview]
Message-ID: <20240904054132.F2DF72220083@mailuser.phl.internal> (raw)
In-Reply-To: <20240903043240.1776614-1-xu.xin16@zte.com.cn>
xu xin <xu.xin.sc@gmail.com> writes:
> Hi,
>
> In the field of embedded Linux for cost considerations, resources including
> cpu and memory, are often not very sufficient, so the global deployment of
> KSM can be a mitigation strategy, which is feasible for closed system
> (scenarios without Internet connection). However, KSM has a side effect of
> increasing write time replication latency, which is somewhat unacceptable
> for latency sensitive applications. Therefore, it can be combined with the
> QoS of the business tasks to dynamically close some part of those already
> started processes in real time if the QoS degrade. Although it is also
> beneficial for server/cloud OS, the requirement of embedded system is more
> urgent and strong compared to cloud or server operating systems with
> sufficient memory.
In general I'd expect a different approach for embedded Linux. Evaluate
which processes benefit from KSM and only enable it for these processes.
On embedded platforms CPU is generally a scarce resource.
In addition there is already the KSM advisor which checks if VMA's are
have benefited from KSM sharing or not. If they haven't benefited then
they are skipped the next time. Have you evaluated this?
Simply turning on and off KSM for certain processes seems to be a bit
questionable. How do you evaluate that you have waited long enough? To
see the benefits for KSM you need to have at least two full scans. Are
you taking that into account.
I don't see a strong use case for implementing a second technique to
achieve something similar.
next prev parent reply other threads:[~2024-09-04 5:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 4:32 [PATCH 0/3] mm/ksm: Support controlling KSM with PID xu xin
2024-09-04 5:31 ` Stefan Roesch [this message]
2024-09-07 2:23 ` xu xin
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=20240904054132.F2DF72220083@mailuser.phl.internal \
--to=shr@devkernel.io \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xu.xin.sc@gmail.com \
--cc=xu.xin16@zte.com.cn \
/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