From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B1AB141D30; Tue, 21 Feb 2023 17:26:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96F9D431F7; Tue, 21 Feb 2023 17:26:39 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id BD19140E0F for ; Tue, 21 Feb 2023 17:26:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676996798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fqq5974WYMpflo3CwU2Um8vIxrqH7wubu2nwi0s0/TE=; b=d7fPP7O3KdbanaU8XGHnhU3RuLVP4iEQcMB1BreZTTaWAy9MGZKq++dUxj77TgOc4Uj9d1 XOhtKp1mFW8XdplSdIFdYvd8He+XuuU8o/wLG7PbBS7hKTpOQAjdKwx5m8oMAPgs9oRdmY a7f5Xl8jdbGiHok6NrSCTwxtQh120XY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-287-QYbo_oOgP6iqOQjcN3EsbA-1; Tue, 21 Feb 2023 11:26:34 -0500 X-MC-Unique: QYbo_oOgP6iqOQjcN3EsbA-1 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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 502CE3C10221; Tue, 21 Feb 2023 16:26:34 +0000 (UTC) Received: from [10.39.208.21] (unknown [10.39.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7640B1121314; Tue, 21 Feb 2023 16:26:33 +0000 (UTC) Message-ID: <3e2a349c-c8d3-fc07-8184-40ed54f5a8b1@redhat.com> Date: Tue, 21 Feb 2023 17:26:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v3] vhost: exclude VM hugepages from coredumps To: Mike Pattrick , David Marchand Cc: Chenbo Xia , dev@dpdk.org References: <20221206150509.772408-1-mkp@redhat.com> <20221207165408.895018-1-mkp@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Mike, On 2/10/23 22:12, Mike Pattrick wrote: > On Fri, Feb 10, 2023 at 10:53 AM David Marchand > wrote: >> >> Hello Mike, >> >> On Wed, Dec 7, 2022 at 5:54 PM Mike Pattrick 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 >> >> 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 >> >