From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 39AFB2BC7 for ; Wed, 28 Mar 2018 10:48:10 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F4104023141; Wed, 28 Mar 2018 08:48:09 +0000 (UTC) Received: from [10.36.112.44] (ovpn-112-44.ams2.redhat.com [10.36.112.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA43810B2B34; Wed, 28 Mar 2018 08:48:06 +0000 (UTC) To: "Tan, Jianfeng" , "Kulasek, TomaszX" , "yliu@fridaylinux.org" Cc: "dev@dpdk.org" , "Basierski, SebastianX" References: <20180209174017.14644-1-tomaszx.kulasek@intel.com> From: Maxime Coquelin Message-ID: Date: Wed, 28 Mar 2018 10:48:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Mar 2018 08:48:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 28 Mar 2018 08:48:09 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH] vhost: reduce size of coredump file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2018 08:48:10 -0000 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 >> Signed-off-by: Tomasz Kulasek >> --- >> 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 >