From: "Michael S. Tsirkin" <mst@redhat.com>
To: Hu Tao <hutao@cn.fujitsu.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Wanlong Gao <gaowanlong@cn.fujitsu.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3.2 01/31] NUMA: move numa related code to new file numa.c
Date: Mon, 9 Jun 2014 09:26:08 +0300 [thread overview]
Message-ID: <20140609062608.GA11462@redhat.com> (raw)
In-Reply-To: <20140609022234.GF14434@G08FNSTD100614.fnst.cn.fujitsu.com>
On Mon, Jun 09, 2014 at 10:22:35AM +0800, Hu Tao wrote:
> On Sun, Jun 08, 2014 at 01:09:03PM +0300, Michael S. Tsirkin wrote:
> > On Wed, May 14, 2014 at 05:43:05PM +0800, Hu Tao wrote:
> > > From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> > >
> > > Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> > > Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> >
> > This is also based on bits by Blue Swirl and
> > Andre Przywara, I think you should add their S.O.B. lines
> > from the original commits, just in case we need to locate the authors
> > down the line.
>
> Sure. Should I use Andre's new email address(linaro) as the old
> email address(amd) can't be reached now?
I used the S.O.B. line that was used when code was submitted.
> >
> > > ---
> > > Makefile.target | 2 +-
> > > cpus.c | 14 ----
> > > include/exec/cpu-all.h | 2 -
> > > include/exec/cpu-common.h | 2 +
> > > include/sysemu/cpus.h | 1 -
> > > include/sysemu/sysemu.h | 3 +
> > > numa.c | 186 ++++++++++++++++++++++++++++++++++++++++++++++
> > > vl.c | 139 +---------------------------------
> > > 8 files changed, 193 insertions(+), 156 deletions(-)
> > > create mode 100644 numa.c
> > >
> > > diff --git a/Makefile.target b/Makefile.target
> > > index 9986047..dd815bb 100644
> > > --- a/Makefile.target
> > > +++ b/Makefile.target
> > > @@ -112,7 +112,7 @@ endif #CONFIG_BSD_USER
> > > #########################################################
> > > # System emulator target
> > > ifdef CONFIG_SOFTMMU
> > > -obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o
> > > +obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o
> > > obj-y += qtest.o
> > > obj-y += hw/
> > > obj-$(CONFIG_FDT) += device_tree.o
> > > diff --git a/cpus.c b/cpus.c
> > > index 7bbe153..7f87adb 100644
> > > --- a/cpus.c
> > > +++ b/cpus.c
> > > @@ -1313,20 +1313,6 @@ static void tcg_exec_all(void)
> > > exit_request = 0;
> > > }
> > >
> > > -void set_numa_modes(void)
> > > -{
> > > - CPUState *cpu;
> > > - int i;
> > > -
> > > - CPU_FOREACH(cpu) {
> > > - for (i = 0; i < nb_numa_nodes; i++) {
> > > - if (test_bit(cpu->cpu_index, node_cpumask[i])) {
> > > - cpu->numa_node = i;
> > > - }
> > > - }
> > > - }
> > > -}
> > > -
> > > void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
> > > {
> > > /* XXX: implement xxx_cpu_list for targets that still miss it */
> > > diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
> > > index fb649a4..758a928 100644
> > > --- a/include/exec/cpu-all.h
> > > +++ b/include/exec/cpu-all.h
> > > @@ -414,8 +414,6 @@ CPUArchState *cpu_copy(CPUArchState *env);
> > >
> > > /* memory API */
> > >
> > > -extern ram_addr_t ram_size;
> > > -
> > > /* RAM is pre-allocated and passed into qemu_ram_alloc_from_ptr */
> > > #define RAM_PREALLOC_MASK (1 << 0)
> > >
> > > diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
> > > index a21b65a..e8c7970 100644
> > > --- a/include/exec/cpu-common.h
> > > +++ b/include/exec/cpu-common.h
> > > @@ -45,6 +45,8 @@ typedef uintptr_t ram_addr_t;
> > > # define RAM_ADDR_FMT "%" PRIxPTR
> > > #endif
> > >
> > > +extern ram_addr_t ram_size;
> > > +
> > > /* memory API */
> > >
> > > typedef void CPUWriteMemoryFunc(void *opaque, hwaddr addr, uint32_t value);
> > > diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
> > > index 6502488..4f79081 100644
> > > --- a/include/sysemu/cpus.h
> > > +++ b/include/sysemu/cpus.h
> > > @@ -23,7 +23,6 @@ extern int smp_threads;
> > > #define smp_threads 1
> > > #endif
> > >
> > > -void set_numa_modes(void);
> > > void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg);
> > >
> > > #endif
> > > diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> > > index ba5c7f8..565c8f6 100644
> > > --- a/include/sysemu/sysemu.h
> > > +++ b/include/sysemu/sysemu.h
> > > @@ -144,6 +144,9 @@ extern QEMUClockType rtc_clock;
> > > extern int nb_numa_nodes;
> > > extern uint64_t node_mem[MAX_NODES];
> > > extern unsigned long *node_cpumask[MAX_NODES];
> > > +void numa_add(const char *optarg);
> > > +void set_numa_nodes(void);
> > > +void set_numa_modes(void);
> > >
> > > #define MAX_OPTION_ROMS 16
> > > typedef struct QEMUOptionRom {
> >
> > Down the line I think numa.h would be nicer,
> > not a must to fix.
> >
> >
> >
> > > diff --git a/numa.c b/numa.c
> > > new file mode 100644
> > > index 0000000..395c14f
> > > --- /dev/null
> > > +++ b/numa.c
> > > @@ -0,0 +1,186 @@
> > > +/*
> > > + * QEMU System Emulator
> >
> > Is this the best we can do here? This was reasonable for vl.c
> >
> > Better "NUMA parameter parsing"
>
> Sure.
>
> >
> > > + *
> > > + * Copyright (c) 2013 Fujitsu Ltd.
> >
> > It's 2014 isn't it?
> >
> >
> > > + * Author: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> >
> > These tags are probably best avoided for non original code:
> > we don't have the resources to keep them up to date as code changes.
> > Better dropped it for now.
>
> OK.
>
>
> Regards,
> Hu
next prev parent reply other threads:[~2014-06-09 6:25 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 9:43 [Qemu-devel] [PATCH v3.2 00/31] NUMA series, and hostmem improvements Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 01/31] NUMA: move numa related code to new file numa.c Hu Tao
2014-06-08 10:09 ` Michael S. Tsirkin
2014-06-09 2:22 ` Hu Tao
2014-06-09 6:26 ` Michael S. Tsirkin [this message]
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 02/31] NUMA: check if the total numa memory size is equal to ram_size Hu Tao
2014-06-08 10:09 ` Michael S. Tsirkin
2014-06-09 2:23 ` Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 03/31] NUMA: Add numa_info structure to contain numa nodes info Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 04/31] NUMA: convert -numa option to use OptsVisitor Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 05/31] NUMA: expand MAX_NODES from 64 to 128 Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 06/31] man: improve -numa doc Hu Tao
2014-05-14 20:11 ` Eduardo Habkost
2014-06-08 10:09 ` Michael S. Tsirkin
2014-06-09 2:23 ` Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 07/31] vl: redo -object parsing Hu Tao
2014-06-08 9:05 ` Michael S. Tsirkin
2014-06-09 2:13 ` Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 08/31] qmp: allow object-add completion handler to get canonical path Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 09/31] qmp: improve error reporting for -object and object-add Hu Tao
2014-05-14 20:13 ` Eduardo Habkost
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 10/31] pc: pass QEMUMachineInitArgs to pc_memory_init Hu Tao
2014-05-14 20:14 ` Eduardo Habkost
2014-06-08 9:40 ` Michael S. Tsirkin
2014-06-09 2:13 ` Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 11/31] numa: introduce memory_region_allocate_system_memory Hu Tao
2014-05-14 20:30 ` Eduardo Habkost
2014-06-09 2:24 ` Hu Tao
2014-06-08 10:10 ` Michael S. Tsirkin
2014-06-09 2:27 ` Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 12/31] add memdev backend infrastructure Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 13/31] numa: add -numa node, memdev= option Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 14/31] memory: reorganize file-based allocation Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 15/31] memory: move mem_path handling to memory_region_allocate_system_memory Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 16/31] memory: add error propagation to file-based RAM allocation Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 17/31] memory: move preallocation code out of exec.c Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 18/31] memory: move RAM_PREALLOC_MASK to exec.c, rename Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 19/31] hostmem: add file-based HostMemoryBackend Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 20/31] hostmem: separate allocation from UserCreatable complete method Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 21/31] hostmem: add merge and dump properties Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 22/31] hostmem: allow preallocation of any memory region Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 23/31] hostmem: add property to map memory with MAP_SHARED Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 24/31] configure: add Linux libnuma detection Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 25/31] hostmem: add properties for NUMA memory policy Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 26/31] Introduce signed range Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 27/31] qapi: make string input visitor parse int list Hu Tao
2014-06-08 10:11 ` Michael S. Tsirkin
2014-06-09 2:28 ` Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 28/31] qapi: make string output " Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 29/31] qom: introduce object_property_get_enum and object_property_get_uint16List Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 30/31] qmp: add query-memdev Hu Tao
2014-05-14 9:43 ` [Qemu-devel] [PATCH v3.2 31/31] hmp: add info memdev Hu Tao
2014-06-08 10:10 ` Michael S. Tsirkin
2014-06-09 2:28 ` Hu Tao
2014-06-08 10:11 ` [Qemu-devel] [PATCH v3.2 00/31] NUMA series, and hostmem improvements Michael S. Tsirkin
2014-06-09 2:30 ` Hu Tao
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=20140609062608.GA11462@redhat.com \
--to=mst@redhat.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=hutao@cn.fujitsu.com \
--cc=imammedo@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).