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 256B441D3D; Wed, 22 Feb 2023 15:00:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09AF542FB4; Wed, 22 Feb 2023 15:00:14 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 6ACB440693 for ; Wed, 22 Feb 2023 15:00:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677074411; 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: in-reply-to:in-reply-to:references:references; bh=wHFYSd6+sv0VylvieTMUxrYYZe1ClHNM2u+7nMYFSek=; b=hKA9bae7iysiZ8KPbF1DregSPOBT2rqy16SW7xmNc7n2kQjMMRrs1wgLRZ+io0orwknygn XZa//Aqa4DuP7g6LdjesCzakboEhMMXX88B+Z4v3egUNA3GNID3IeEZKhSjI1sEX/6KymI QGc4cikZvjCFF58vRfZFkA3YHWKeco8= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-244-plMDfPkyNDeUdWdfQhxfqg-1; Wed, 22 Feb 2023 09:00:10 -0500 X-MC-Unique: plMDfPkyNDeUdWdfQhxfqg-1 Received: by mail-ed1-f72.google.com with SMTP id fi8-20020a056402550800b004a26cc7f6cbso10768997edb.4 for ; Wed, 22 Feb 2023 06:00:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wHFYSd6+sv0VylvieTMUxrYYZe1ClHNM2u+7nMYFSek=; b=5m0aWRGxpL4UMrNrFDUFUmAADdxyuIKRU+kr3ob2UtO1Wvlv2gdyf9AD+RxmmzUyIO TgeLmcWII362J20nim2VkcN+si6loxeAHJpFKJK0Dkm1GGiebXRxRIetwiwcUr15rCBI OxYt9kK4ssyOzj0+eJMgapkzu14AZTxMlGm0dn3TMZZyfrPlRU1tjvmHofaBLaWvl0nz Xkw55dcPdlljezmA8TWXlQzB+tV9nxDmrcnFXpyeMoAjJsMMnqf1mXW/hFDAOmBGd2AY q2dQ33p03T5JPcKIDXjbNcnXNJxUxCyrZFGE1bg+qqfUIWzqAnIWg0yyBdW9unPtJ1iK JZ/A== X-Gm-Message-State: AO0yUKV0N2GHg9Medrx57YsQvDQY0lVSPpe8pIhRNiH9jYsbFCPbdtZH dwALawLn6oYtYv6zuvLShvmqhlXOqvQkUhReELS1ZHjHT94WvqmwveSJKcp2JxKXE+vMLaG51nW 3s5S9V7Ng+DBR3xJ5yy9x7dio X-Received: by 2002:a17:906:48c9:b0:878:4a24:1a5c with SMTP id d9-20020a17090648c900b008784a241a5cmr7684693ejt.6.1677074407327; Wed, 22 Feb 2023 06:00:07 -0800 (PST) X-Google-Smtp-Source: AK7set8le6V8sztmT9eI7sig7DFupuxD+moaQbHFP9GnBnYwAvHnTboR3+TeU+gr9fqZbvQRYUgkB64zu2hDQS0F7+E= X-Received: by 2002:a17:906:48c9:b0:878:4a24:1a5c with SMTP id d9-20020a17090648c900b008784a241a5cmr7684687ejt.6.1677074407071; Wed, 22 Feb 2023 06:00:07 -0800 (PST) MIME-Version: 1.0 References: <20221206150509.772408-1-mkp@redhat.com> <20221207165408.895018-1-mkp@redhat.com> <3e2a349c-c8d3-fc07-8184-40ed54f5a8b1@redhat.com> In-Reply-To: <3e2a349c-c8d3-fc07-8184-40ed54f5a8b1@redhat.com> From: Mike Pattrick Date: Wed, 22 Feb 2023 08:59:55 -0500 Message-ID: Subject: Re: [PATCH v3] vhost: exclude VM hugepages from coredumps To: Maxime Coquelin Cc: David Marchand , Chenbo Xia , dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 On Tue, Feb 21, 2023 at 11:26 AM Maxime Coquelin wrote: > > 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? Yes, thanks for the ping. I should have a patch soon. Cheers, M > > Thanks, > Maxime > > > -M > > > >> > >> -- > >> David Marchand > >> > > >