From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
"Kulasek, TomaszX" <tomaszx.kulasek@intel.com>,
"yliu@fridaylinux.org" <yliu@fridaylinux.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Basierski, SebastianX" <sebastianx.basierski@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: reduce size of coredump file
Date: Wed, 28 Mar 2018 10:48:05 +0200 [thread overview]
Message-ID: <b0a965c9-e588-ba13-02c7-f9c08b9cf4aa@redhat.com> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E3651439D99@SHSMSX103.ccr.corp.intel.com>
On 02/11/2018 05:34 AM, Tan, Jianfeng wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Kulasek
>> Sent: Saturday, February 10, 2018 1:40 AM
>> To: yliu@fridaylinux.org
>> Cc: dev@dpdk.org; Basierski, SebastianX
>> Subject: [dpdk-dev] [PATCH] vhost: reduce size of coredump file
>>
>> If application coredumps with vhost-user devices connected to it,
>> the generated coredump file size is huge.
>>
>> To limit its size, this patch adds call to madvise() with MADV_DONTDUMP
>> on memory regions mapped from the VM.
>
> As virtqueue is on guest memory, by this patch, the vq information will not be available in the coredump.
>
> Just wonder if adjusting /proc/pid/coredump_filter can help your case?
Yes it helps as by default I never have the guest memory in the
coredumps I receive.
Maxime
> Thanks,
> Jianfeng
>
>>
>> Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
>> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
>> ---
>> lib/librte_vhost/vhost_user.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
>> index 65ee33919..fc1f1a948 100644
>> --- a/lib/librte_vhost/vhost_user.c
>> +++ b/lib/librte_vhost/vhost_user.c
>> @@ -723,6 +723,11 @@ vhost_user_set_mem_table(struct virtio_net *dev,
>> struct VhostUserMsg *pmsg)
>> goto err_mmap;
>> }
>>
>> + if (madvise(mmap_addr, mmap_size,
>> MADV_DONTDUMP) != 0) {
>> + RTE_LOG(INFO, VHOST_CONFIG,
>> + "MADV_DONTDUMP advice setting
>> failed.\n");
>> + }
>> +
>> reg->mmap_addr = mmap_addr;
>> reg->mmap_size = mmap_size;
>> reg->host_user_addr = (uint64_t)(uintptr_t)mmap_addr +
>> --
>> 2.14.1
>
prev parent reply other threads:[~2018-03-28 8:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 17:40 Tomasz Kulasek
2018-02-11 4:34 ` Tan, Jianfeng
2018-03-28 8:48 ` Maxime Coquelin [this message]
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=b0a965c9-e588-ba13-02c7-f9c08b9cf4aa@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=sebastianx.basierski@intel.com \
--cc=tomaszx.kulasek@intel.com \
--cc=yliu@fridaylinux.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).