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 77550A0508; Wed, 6 Apr 2022 01:14:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10C0A40E2D; Wed, 6 Apr 2022 01:14:51 +0200 (CEST) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mails.dpdk.org (Postfix) with ESMTP id 3D0A740DF6 for ; Wed, 6 Apr 2022 01:14:49 +0200 (CEST) Received: by mail-lj1-f171.google.com with SMTP id g24so984321lja.7 for ; Tue, 05 Apr 2022 16:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8rGs2kdSIpOlqHGakiGk3s/qKbRgq7NJJG4mP06UTlw=; b=j9qvataaCZqJseak3QdQlDjrYrojQzpBvsV9BoPXKwkhHvEz2/bGTbKXlYJ17SManz Lu6mgg7eD8Wo485Tq1ujzbFwsaAyNubpEdE4YIkLrOOJRdIbHGxSevCXqfdUQiCJzzs8 LSuT7vOLSVO2Nki7ope1BM2c52EfKfc8lu1zMVupYEdnI89+S+sq79hrN2e+2Mmhlffi b/a0R+HB4lCU9Xa5I6eDJmCrhIUyf+gcxBv1jFffJonZqzbm3PeVKJ+rSAY908XqwYkM 3bC+HOYgJYiMbXmuoHq9bXzVWFr41OJo2462Aq0r7qxqY730icPRASM+cyuBaRJrtLEa AiHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8rGs2kdSIpOlqHGakiGk3s/qKbRgq7NJJG4mP06UTlw=; b=FeF4RhBKeEJiWU5YrVLaLkXMOHjDuNJdDveN7NSI91lERLLd9clZco7tiLI9AL0/ZP xSuuo07/09vII0a94lop4yE2PS0O8cXIKUbuR6sPqW1J5rjy4rxCMaQqlR5Vz5dtuJ1j 2TDrZHXR4YWj0ak/mn14W29lN9MR5KFdo58c2CNSJVVIpGaSPxOQpIANZDaRkA2X/BMt PHz6ce2Foo7emRdhdFOgdyv5tl7DW+JZp/HxiSXawiHSWYLRB8pHwBbhXo1E4k1Jk57t s1AFbLhSDkjCF7KqQUOJyk0yNdSF7MY3a1zes6oHMK3uFUBXK3ZYyczeZnD0CewU2qoU fBFg== X-Gm-Message-State: AOAM530QmJIAXJYbNGoRr5ksshUx+fsaKgvlVdunLaUryKagTRTpx5xx LTbvBf8k2+EfzOo8sddl0Fs= X-Google-Smtp-Source: ABdhPJxZKbXsv8hy3iCxKcfSkKfHX50VOKlytHKiXg9ewzoRwl9f5JE3/D6lcHLHWMPBpE8apLELeQ== X-Received: by 2002:a2e:bc1e:0:b0:249:896f:6dbf with SMTP id b30-20020a2ebc1e000000b00249896f6dbfmr3603598ljf.180.1649200488527; Tue, 05 Apr 2022 16:14:48 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id y12-20020a2eb00c000000b00249b0547be5sm1454247ljk.99.2022.04.05.16.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:14:47 -0700 (PDT) Date: Wed, 6 Apr 2022 02:14:46 +0300 From: Dmitry Kozlyuk To: Stephen Hemminger Cc: Li Feng , Anatoly Burakov , dev@dpdk.org Subject: Re: [PATCH v2] eal/linux: enable the hugepage mem dump Message-ID: <20220406021446.0cf75ada@sovereign> In-Reply-To: <20220405154655.60900b0d@hermes.local> References: <20220308094125.2716847-1-fengli@smartx.comOD> <20220401091004.3227117-1-fengli@smartx.com> <20220405154655.60900b0d@hermes.local> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 2022-04-05 15:46 (UTC-0700), Stephen Hemminger: > On Fri, 1 Apr 2022 17:10:04 +0800 > Li Feng wrote: > > > These hugepages include important structures. we should dump these > > hugepages into a coredump file for debugging when generating a coredump. > > > > Signed-off-by: Li Feng > > --- > > lib/eal/linux/eal_memalloc.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c > > index f8b1588cae..93c4f396cf 100644 > > --- a/lib/eal/linux/eal_memalloc.c > > +++ b/lib/eal/linux/eal_memalloc.c > > @@ -677,6 +677,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id, > > __func__); > > #endif > > > > + eal_mem_set_dump(addr, alloc_sz, true); > > + > > huge_recover_sigbus(); > > > > ms->addr = addr; > > > Don't merge this patch as is please; it would cause a lot of pain > in a cloud environment. > > In our environment core dumps are collected (via systemd) and uploaded > to a central server. With this kind of change the processing would get > overloaded with multi-gigabyte core dump size. Probably couldn't even > save a core dump on these kind of smart nics. > > > This needs to be optional (from command line) and default to the current > behavior (not dumping huge pages). Maybe expose eal_mem_set_dump() as rte_mem_set_dump()? This would allow to implement the feature easily using memory callbacks. Better, one can enable hugepages to dump selectively: for example, dump some interesting hash tables but skip rings and mempools.