os_mem_prealloc questions

2019-12-17 Thread jack.chen
hello: I found os_mem_prealloc prealloc memory by multiple threads ,and max threads number is 16,I want do know the reason,why do not use smp_cpus? (in fact,I also found smp_cpus can not reduce more start time,I just want to know the reasion) thanks!

[Qemu-devel] virtio notiry question

2018-09-23 Thread jack.chen
hello ,when I read virtio source code ,I was confused about when back-end notify front-end。 In function virtio_should_notify,if vq->signalled_used_valid == false or vring_need_event(vring_get_used_event(vq), new, old) is true,notiry will occur。but I can not understand when vq->signalled_used_valid

Re: [Qemu-devel] vhost-user question

2018-02-01 Thread jack.chen
. David Alan Gilbert : > * jack.chen (zhun...@gmail.com) wrote: >> thanks,but I really can not understand how the fd works,can someone >> explain it or give me some reference material?? > > Probably the man page for the mmap system call, or an introduction to > linux/unix

Re: [Qemu-devel] vhost-user question

2018-01-31 Thread jack.chen
thanks,but I really can not understand how the fd works,can someone explain it or give me some reference material?? 2018-02-01 1:31 GMT+08:00 Dr. David Alan Gilbert : > * jack.chen (zhun...@gmail.com) wrote: >> hello,I am confused when I read vhost-user source code in qemu.I know >

[Qemu-devel] vhost-user question

2018-01-31 Thread jack.chen
hello,I am confused when I read vhost-user source code in qemu.I know vhost-user app shared memory with qemu by mmap,but why it can use fd which is belong to qemu? relative code: qemu code in function vhost_user_set_mem_table fd = memory_region_get_fd(mr); if (fd > 0) { msg.pay

[Qemu-devel] question about handling overlapping memory when add region in qemu

2017-04-19 Thread jack.chen
Hello ,in kvm_set_phys_mem,I am confused about the following codes: delta = TARGET_PAGE_ALIGN(size) - size; if (delta > size) { return; } start_addr += delta; size -= delta; size &= TARGET_PAGE_MASK; why start_addr need to add delta,and why size sub delta,in my own opin

Re: [Qemu-devel] qemu memory manage question

2017-04-18 Thread jack.chen
-18 10:25 GMT+08:00 jack.chen : > Thanks very much!! > > 2017-04-17 19:19 GMT+08:00 李强 : >> >> >>> -Original Message- >>> From: Qemu-devel >>> [mailto:qemu-devel-bounces+liqiang6-s=360...@nongnu.org] On Behalf Of >>> jack.chen >>

Re: [Qemu-devel] qemu memory manage question

2017-04-17 Thread jack.chen
Thanks very much!! 2017-04-17 19:19 GMT+08:00 李强 : > > >> -Original Message- >> From: Qemu-devel >> [mailto:qemu-devel-bounces+liqiang6-s=360...@nongnu.org] On Behalf Of >> jack.chen >> Sent: Monday, April 17, 2017 6:56 PM >> To: Peter Xu >

Re: [Qemu-devel] qemu memory manage question

2017-04-17 Thread jack.chen
for each address_space,so the listener->region_add was executed then.I do not know what mistake I have made,can you explain it to me ?? thank you very much! 2017-04-17 18:26 GMT+08:00 Peter Xu : > On Mon, Apr 17, 2017 at 06:09:11PM +0800, jack.chen wrote: >> hello,I have some questions

[Qemu-devel] qemu memory manage question

2017-04-17 Thread jack.chen
hello,I have some questions about memory allocation in qemu for virtual machine.I found when configure_accelerator function was called ,memory slots were registered to KVM,but at that time address_space have not been initialized and ram have not been allocated,it is really confused me,Thanks a lot