All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "dle-develop@lists.sourceforge.net"
	<dle-develop@lists.sourceforge.net>,
	Seiji Aguchi <seiji.aguchi@hds.com>,
	Satoru Moriya <satoru.moriya@hds.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"avi@redhat.com" <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Add option to mlock guest and qemu memory
Date: Fri, 28 Sep 2012 10:54:14 -0500	[thread overview]
Message-ID: <87lifucfdl.fsf@codemonkey.ws> (raw)
In-Reply-To: <5065A2AB.7050104@siemens.com>

Jan Kiszka <jan.kiszka@siemens.com> writes:

> On 2012-09-28 14:33, Anthony Liguori wrote:
>> Jan Kiszka <jan.kiszka@siemens.com> writes:
>> 
>>> On 2012-09-28 01:21, Satoru Moriya wrote:
>>>> This is a first time for me to post a patch to qemu-devel.
>>>> If there is something missing/wrong, please let me know.
>>>>
>>>> We have some plans to migrate old enterprise systems which require
>>>> low latency (msec order) to kvm virtualized environment. Usually,
>>>> we uses mlock to preallocate and pin down process memory in order
>>>> to avoid page allocation in latency critical path. On the other
>>>> hand, in kvm environment, mlocking in guests is not effective
>>>> because it can't avoid page reclaim in host. Actually, to avoid
>>>> guest memory reclaim, qemu has "mem-path" option that is actually
>>>> for using hugepage. But a memory region of qemu is not allocated
>>>> on hugepage, so it may be reclaimed. That may cause a latency
>>>> problem.
>>>>
>>>> To avoid guest and qemu memory reclaim, this patch introduces
>>>> a new "mlock" option. With this option, we can preallocate and
>>>> pin down guest and qemu memory before booting guest OS.
>>>
>>> I guess this reduces the likeliness of multi-millisecond latencies for
>>> you but not eliminate them. Of course, mlockall is part of our local
>>> changes for real-time QEMU/KVM, but it is just one of the many pieces
>>> required. I'm wondering how the situation is on your side.
>>>
>>> I think mlockall should once be enabled automatically as soon as you ask
>>> for real-time support for QEMU guests. How that should be controlled is
>>> another question. I'm currently carrying a top-level switch "-rt
>>> maxprio=x[,policy=y]" here, likely not the final solution. I'm not
>>> really convinced we need to control memory locking separately. And as we
>>> are very reluctant to add new top-level switches, this is even more
>>> important.
>> 
>> I think you're right here although I'd suggest not abbreviating.
>
> You mean the sense of "-realtime" instead of "-rt"?

Yes.  Or any other word that makes sense.

Regards,

Anthony Liguori

>
> Jan
>
> -- 
> Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
> Corporate Competence Center Embedded Linux

  reply	other threads:[~2012-09-28 15:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 23:21 [Qemu-devel] [PATCH] Add option to mlock guest and qemu memory Satoru Moriya
2012-09-28  8:05 ` Jan Kiszka
2012-09-28 12:33   ` Anthony Liguori
2012-09-28 13:14     ` Jan Kiszka
2012-09-28 15:54       ` Anthony Liguori [this message]
2012-10-01 21:24   ` Satoru Moriya

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=87lifucfdl.fsf@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --cc=satoru.moriya@hds.com \
    --cc=seiji.aguchi@hds.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.