From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Mike Pattrick <mkp@redhat.com>,
David Marchand <david.marchand@redhat.com>
Cc: Chenbo Xia <chenbo.xia@intel.com>, dev@dpdk.org
Subject: Re: [PATCH v3] vhost: exclude VM hugepages from coredumps
Date: Tue, 21 Feb 2023 17:26:32 +0100 [thread overview]
Message-ID: <3e2a349c-c8d3-fc07-8184-40ed54f5a8b1@redhat.com> (raw)
In-Reply-To: <CAHcdBH6fjRNPme5rvYrkPgNx+5cY4JD8noqFU13xZCG92h2riA@mail.gmail.com>
Hi Mike,
On 2/10/23 22:12, Mike Pattrick wrote:
> On Fri, Feb 10, 2023 at 10:53 AM David Marchand
> <david.marchand@redhat.com> wrote:
>>
>> Hello Mike,
>>
>> On Wed, Dec 7, 2022 at 5:54 PM Mike Pattrick <mkp@redhat.com> wrote:
>>>
>>> Currently if an application wants to include shared hugepages in
>>> coredumps in conjunction with the vhost library, the coredump will be
>>> larger than expected and include unneeded virtual machine memory.
>>>
>>> This patch will mark all vhost huge pages as DONTDUMP, except for some
>>> select pages used by DPDK.
>>>
>>> Signed-off-by: Mike Pattrick <mkp@redhat.com>
>>
>> I noticed the following warnings today on my f37 kernel, while running
>> a vhost-user/virtio-user testpmd setup on next-virtio branch.
>> Linux dmarchan 6.1.9-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb 2
>> 00:21:48 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
>> My system has 2M hugepages, only.
>>
>>
>> $ rm vhost-net; strace -e trace=madvise -f
>> ./build-clang/app/dpdk-testpmd --in-memory --no-pci
>> --vdev=net_vhost0,iface=./vhost-net,client=1 -- -i
>>
>> $ ./build-clang/app/dpdk-testpmd --in-memory --single-file-segment
>> --no-pci --vdev
>> 'net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1' --
>> -i
>>
>> Then, on the "vhost side" testpmd:
>> ...
>> VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_NUM
>> VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_BASE
>> VHOST_CONFIG: (./vhost-net) vring base idx:0 last_used_idx:0 last_avail_idx:0.
>> VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_ADDR
>> VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_KICK
>> VHOST_CONFIG: (./vhost-net) vring kick idx:0 file:391
>> [pid 59565] madvise(0x7fa6d8da4000, 2052, MADV_DODUMP) = -1 EINVAL
>> (Invalid argument)
>> VHOST_CONFIG: could not set coredump preference (Invalid argument).
>> [pid 59565] madvise(0x7fa6d8da5000, 2052, MADV_DODUMP) = -1 EINVAL
>> (Invalid argument)
>> VHOST_CONFIG: could not set coredump preference (Invalid argument).
>> [pid 59565] madvise(0x7fa6d8da6000, 2052, MADV_DODUMP) = -1 EINVAL
>> (Invalid argument)
>> VHOST_CONFIG: could not set coredump preference (Invalid argument).
>> VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_NUM
>> VHOST_CONFIG: (./vhost-net) read message VHOST_USER_SET_VRING_BASE
>>
>> Looking at the whole trace, only madvise calls with MADV_DODUMP (with
>> all of them for a 2052 size) fail.
>>
>> I did not investigate further.
>> Could you have a look please?
>>
>
> I tried it on that exact kernel and also ran into this issue. I'll
> check it out in more depth.
Gentle reminder, have you found the root cause for this issue?
Thanks,
Maxime
> -M
>
>>
>> --
>> David Marchand
>>
>
next prev parent reply other threads:[~2023-02-21 16:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 15:05 [PATCH v2] " Mike Pattrick
2022-12-07 16:54 ` [PATCH v3] " Mike Pattrick
2022-12-20 12:43 ` Maxime Coquelin
2023-02-03 14:50 ` Maxime Coquelin
2023-02-10 15:53 ` David Marchand
2023-02-10 15:59 ` Maxime Coquelin
2023-02-10 21:12 ` Mike Pattrick
2023-02-21 16:26 ` Maxime Coquelin [this message]
2023-02-22 13:59 ` Mike Pattrick
2023-02-22 21:43 ` [PATCH] vhost: fix madvise arguments alignment Mike Pattrick
2023-02-23 4:35 ` [PATCH v2] " Mike Pattrick
2023-02-23 16:12 ` Maxime Coquelin
2023-02-23 16:57 ` Mike Pattrick
2023-02-24 15:05 ` Patrick Robb
2023-03-01 20:02 ` [PATCH v3] " Mike Pattrick
2023-03-02 10:19 ` Maxime Coquelin
2023-03-06 14:22 ` Maxime Coquelin
2023-02-03 17:45 ` [PATCH v2] vhost: exclude VM hugepages from coredumps Stephen Hemminger
2023-02-06 1:13 ` Mike Pattrick
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=3e2a349c-c8d3-fc07-8184-40ed54f5a8b1@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=mkp@redhat.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 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).