From: Igor Mammedov <imammedo@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Hu Tao <hutao@cn.fujitsu.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
lersek@redhat.com, qemu-devel@nongnu.org,
Wanlong Gao <gaowanlong@cn.fujitsu.com>
Subject: Re: [Qemu-devel] [PATCH v18 13/14] memory backend: fill memory backend ram fields
Date: Wed, 26 Feb 2014 15:25:24 +0100 [thread overview]
Message-ID: <20140226152524.4fee536f@nial.usersys.redhat.com> (raw)
In-Reply-To: <530DF070.7020803@redhat.com>
On Wed, 26 Feb 2014 14:47:28 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 26/02/2014 14:43, Igor Mammedov ha scritto:
> > On Wed, 26 Feb 2014 13:45:38 +0100
> > Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> >> Il 26/02/2014 13:31, Igor Mammedov ha scritto:
> >>>>> The problem is that some backends might not be handled the same way.
> >>>>> For example, not all backends might produce a single void*/size_t pair
> >>>>> for the entire region. Think of a "composite" backend that produces a
> >>>>> large memory region from two smaller ones.
> >>> I'd prefer to keep backends simple, with 1:1 mapping to memory regions.
> >>
> >> I agree. However not all backends may have a mapping to a RAM memory
> >> region. A composite backend could create a container memory region
> >> whose children are other HostMemoryBackend objects.
> >>
> >>> Is there a need in composite one or something similar?
> >>
> >> I've heard of users that want a node backed partially by hugetlbfs and
> >> partially by regular RAM. Not sure why.
> > Isn't issue here in how backend is mapped into GPA? Well that is not
> > backend's job.
> >
> > Once one starts to put layout (alignment, noncontinuously mapped
> > memory regions inside of container, ...), mapping HPA->GPA gets complicated.
> >
> > It would be better to use simple building blocks and model as:
> > 2 separate backends (ram + hugetlbfs) and 2 corresponding DIMM devices.
>
> Right, I had forgotten that you can have cold-plugged DIMM devices.
> That's a nice solution, also because it simplifies passing the GPA
> configuration down to the guest.
>
> How would that translate to sharing HostMemoryBackend code for memory
> policies? Which of Hu Tao's proposals do you like best?
possible choices could be:
1: 'realize' approach I suggested
drawback is: assumption that all backends derived from HostMemoryBackend
will inherit NUMA controls even if backend shouldn't have
one (for example: fictional remote memory backend)
plus: derived types from HostMemoryBackend, don't need to know anything
about NUMA.
2: #3 from Hu Tao's suggestion
drawback is: every new backend have to explicitly call NUMA callbacks
somewhat plus is that not NUMA aware backends could ignore NUMA callbacks,
but they would still have NUMA properties available, which is confusing.
3: might be over-engineered #1 from above: build proper class hierarchy:
HostMemoryBackend -> NumaMemoryBackend -> RamBackend
| -> HugepageBackend
|-> whatever else
>
> Paolo
next prev parent reply other threads:[~2014-02-26 14:25 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 7:53 [Qemu-devel] [PATCH v18 00/14] Add support for binding guest numa nodes to host numa nodes Hu Tao
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 01/14] NUMA: move numa related code to new file numa.c Hu Tao
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 02/14] NUMA: check if the total numa memory size is equal to ram_size Hu Tao
2014-02-25 13:38 ` Eric Blake
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 03/14] NUMA: Add numa_info structure to contain numa nodes info Hu Tao
2014-02-19 9:26 ` Igor Mammedov
2014-02-21 2:54 ` hu tao
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 04/14] NUMA: convert -numa option to use OptsVisitor Hu Tao
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 05/14] NUMA: expand MAX_NODES from 64 to 128 Hu Tao
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 06/14] qapi: add SIZE type parser to string_input_visitor Hu Tao
2014-02-19 9:54 ` Igor Mammedov
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 07/14] add memdev backend infrastructure Hu Tao
2014-02-19 9:15 ` Igor Mammedov
2014-02-19 7:53 ` [Qemu-devel] [PATCH v18 08/14] pc: pass QEMUMachineInitArgs to pc_memory_init Hu Tao
2014-02-19 7:54 ` [Qemu-devel] [PATCH v18 09/14] numa: introduce memory_region_allocate_system_memory Hu Tao
2014-02-19 7:54 ` [Qemu-devel] [PATCH v18 10/14] numa: add -numa node, memdev= option Hu Tao
2014-02-19 9:50 ` Igor Mammedov
2014-02-19 11:53 ` Paolo Bonzini
2014-03-04 0:10 ` Eric Blake
2014-03-04 2:20 ` Hu Tao
2014-02-19 7:54 ` [Qemu-devel] [PATCH v18 11/14] qapi: make string input visitor parse int list Hu Tao
2014-02-19 8:17 ` Hu Tao
2014-02-19 8:42 ` Paolo Bonzini
2014-02-19 7:54 ` [Qemu-devel] [PATCH v18 12/14] qapi: add HostMemPolicy enum type Hu Tao
2014-02-19 9:08 ` Paolo Bonzini
2014-02-19 11:23 ` Igor Mammedov
2014-02-19 7:54 ` [Qemu-devel] [PATCH v18 13/14] memory backend: fill memory backend ram fields Hu Tao
2014-02-19 9:03 ` Paolo Bonzini
2014-02-19 9:36 ` Igor Mammedov
2014-02-25 10:20 ` Hu Tao
2014-02-25 14:15 ` Paolo Bonzini
2014-02-26 5:00 ` Hu Tao
2014-02-26 8:47 ` Igor Mammedov
2014-02-26 8:59 ` Hu Tao
2014-02-26 12:19 ` Igor Mammedov
2014-02-26 11:22 ` Paolo Bonzini
2014-02-26 5:57 ` Hu Tao
2014-02-26 9:05 ` Paolo Bonzini
2014-02-26 9:10 ` Igor Mammedov
2014-02-26 10:33 ` Paolo Bonzini
2014-02-26 12:31 ` Igor Mammedov
2014-02-26 12:45 ` Paolo Bonzini
2014-02-26 12:58 ` Marcelo Tosatti
2014-02-26 13:14 ` Paolo Bonzini
2014-02-26 13:43 ` Igor Mammedov
2014-02-26 13:47 ` Paolo Bonzini
2014-02-26 14:25 ` Igor Mammedov [this message]
2014-02-26 14:39 ` Paolo Bonzini
2014-02-25 10:09 ` Hu Tao
2014-03-03 3:24 ` Hu Tao
2014-02-19 7:54 ` [Qemu-devel] [PATCH v18 14/14] amp: add query-memdev Hu Tao
2014-02-19 8:14 ` Hu Tao
2014-02-19 9:07 ` Paolo Bonzini
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=20140226152524.4fee536f@nial.usersys.redhat.com \
--to=imammedo@redhat.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=hutao@cn.fujitsu.com \
--cc=lersek@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).