From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 408211B373 for ; Sun, 11 Feb 2018 05:34:09 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2018 20:34:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,493,1511856000"; d="scan'208";a="17056605" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga008.fm.intel.com with ESMTP; 10 Feb 2018 20:34:07 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 10 Feb 2018 20:34:07 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 10 Feb 2018 20:34:07 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Sun, 11 Feb 2018 12:34:04 +0800 From: "Tan, Jianfeng" To: "Kulasek, TomaszX" , "yliu@fridaylinux.org" CC: "dev@dpdk.org" , "Basierski, SebastianX" Thread-Topic: [dpdk-dev] [PATCH] vhost: reduce size of coredump file Thread-Index: AQHToc02tS1LcMzEA0mnzDlZKJQBkqOenDPg Date: Sun, 11 Feb 2018 04:34:03 +0000 Message-ID: References: <20180209174017.14644-1-tomaszx.kulasek@intel.com> In-Reply-To: <20180209174017.14644-1-tomaszx.kulasek@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Sun, 11 Feb 2018 04:34:10 -0000 > -----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 >=20 > If application coredumps with vhost-user devices connected to it, > the generated coredump file size is huge. >=20 > 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? Thanks, Jianfeng >=20 > Signed-off-by: Sebastian Basierski > Signed-off-by: Tomasz Kulasek > --- > lib/librte_vhost/vhost_user.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > 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; > } >=20 > + if (madvise(mmap_addr, mmap_size, > MADV_DONTDUMP) !=3D 0) { > + RTE_LOG(INFO, VHOST_CONFIG, > + "MADV_DONTDUMP advice setting > failed.\n"); > + } > + > reg->mmap_addr =3D mmap_addr; > reg->mmap_size =3D mmap_size; > reg->host_user_addr =3D (uint64_t)(uintptr_t)mmap_addr + > -- > 2.14.1