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 8AE8041C62; Fri, 10 Feb 2023 22:13:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A765410D3; Fri, 10 Feb 2023 22:13:15 +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 88E6740687 for ; Fri, 10 Feb 2023 22:13:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676063593; 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=rh44exXiGEWyg9QV/TIAbMgMQuJOcNHjUrWPqOfuBFQ=; b=XS0BFTbcNdyEbFR80MaaXhYOBpmMaCf3xN7sKqcf6fpj3V4u0KdZJPMPEErWrVsE3ahmyx Qf7du2QVA3dW3ujTYT2izfRHes9jjEf0mjvebPCXG7Xy+zfBVl6zlp8JGs/p04HPc5Fs2i +Th/FpWpIC02ZBeRFxP4t3J52pnxKJw= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-284-wTZ98BEgOnKnhJbJy_yy6A-1; Fri, 10 Feb 2023 16:13:11 -0500 X-MC-Unique: wTZ98BEgOnKnhJbJy_yy6A-1 Received: by mail-ej1-f70.google.com with SMTP id d14-20020a170906c20e00b00889f989d8deso4278996ejz.15 for ; Fri, 10 Feb 2023 13:13:11 -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=rh44exXiGEWyg9QV/TIAbMgMQuJOcNHjUrWPqOfuBFQ=; b=8Jyd3Hge5VfmisKrldm6GjOFVuxuYI+EbF7hvnHMyQzzx6ZmZ5yqQUPS7Tw5/G8qPf gsRU1j2qvZs3B3ACn9eiCNpFdPW4KCV676RYsJS+mCouE3H5AMfiv6BB/aQQ4ak7HuGI qGjh6UUQE7FYuSKGbD461eYd0XmDtEsxRbl1aJzfXG7pbmpinCntwkO2JFQ8Rn3G5KfM o4UgD1eZ7L9T1LXCp4Yw/Ee4gfJl4G7mS0BIRY81dD4MRBeFU1rluU7J5xK3FU2KUYTk YLGIW2J4wV100MmNo6ZGmmMXJg2axUDj1FOd0+ua454QGeKZ6/pGrvV9gt3S75hBo58t vzxQ== X-Gm-Message-State: AO0yUKXw6RJ42ec/yQBNov27Le8BZMO4qUnWbaF9kKypP6+Son6ns7NK qDOYKwVdkb+ACXuCLFhI6RpBwseB45MvIixNYIyVGp2xOY7bDJqLSycpLSzo1Q4PhnJZMZ0Vl3X YKUhtOAif7v7BpviwA0s= X-Received: by 2002:a17:907:2bd5:b0:878:5947:2599 with SMTP id gv21-20020a1709072bd500b0087859472599mr1582065ejc.6.1676063590739; Fri, 10 Feb 2023 13:13:10 -0800 (PST) X-Google-Smtp-Source: AK7set9DgxCdQ+6T/eqtEVpYHfUd/TdbXMuwx5U7OTL+SCIrc5DVnBvWPKGjhQbegFmak3b1Nyu4bsK7giibFl8rQok= X-Received: by 2002:a17:907:2bd5:b0:878:5947:2599 with SMTP id gv21-20020a1709072bd500b0087859472599mr1582058ejc.6.1676063590542; Fri, 10 Feb 2023 13:13:10 -0800 (PST) MIME-Version: 1.0 References: <20221206150509.772408-1-mkp@redhat.com> <20221207165408.895018-1-mkp@redhat.com> In-Reply-To: From: Mike Pattrick Date: Fri, 10 Feb 2023 16:12:58 -0500 Message-ID: Subject: Re: [PATCH v3] vhost: exclude VM hugepages from coredumps To: David Marchand Cc: Maxime Coquelin , 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 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. -M > > -- > David Marchand >