From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 511F6A05A0; Tue, 21 Apr 2020 23:55:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C3BB61D567; Tue, 21 Apr 2020 23:55:12 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 5B52C1D993 for ; Tue, 21 Apr 2020 13:07:22 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id q18so3072363pgm.11 for ; Tue, 21 Apr 2020 04:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=X1J0W7kKTB9xMnbIWWFxvNW7FbDSu9FYAaBckfXQxUE=; b=jDoBFL89S7IvytW88dScTM5VZf46/dPeSLQMfVHr9elZMP0ej38+em6EBugXIWzOWH mxX+HTGt+7Rgkb1aqNzxHQcfvj3uePX21zfhdnEO5jOwLTGOeJCH8MD59+gHFFAfUiQJ as98RPKQqjQFC/Qp1H+LYinoD8TEEjtp43oW00aQjyWbgFvJTzC52i9vQppfZIODT4fN y/oMUu1ZBla02LhBay4b8HeNtq6kWCyyAQXl2LcR7dV5rG4KWLfuC1AC5g3h+vOzKx7t FQKxYmnEU6Ln/+w49Aa4tvymVD67FZp+KIHLzQPmgWmKcOFZbyYOZYmar8pYVt6tynW8 GqzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=X1J0W7kKTB9xMnbIWWFxvNW7FbDSu9FYAaBckfXQxUE=; b=sToeyiCn6QyxSeyhMYwJ45z60In1MhGXqnWFbgk2BALb8BsAOwmccZ8qKi1UYCDtCQ +znZeUe5erVPYKFdCgnmXKKb0xbSynS40S9pwqPqFlVw+ibXdSdItDfwfBPZOBWtJv1x Ohb7HvylD4owTmHhlslzPLIvOANo1K9cnHmL18thSlPnsmBrOZo1SA+KCqPHEkvUb/N0 qNnk0a2pa2nU1ttIYVZUOGMWDNBtYpxK2b8Qi0C9q7sMYwIr3yUefjMLmlCneMg7zBxA 0I9dIEywW1JrQm5Z4tIdGtiDir/cHH2qLq1tbF4cBxb15YXFe0NCpfSIRFTRiuoR2BhW +5Vw== X-Gm-Message-State: AGi0PuZ0DU/wQtURNpD1xD22pXQpR+Y89Abr4bV0jaP/ry3lvl0FR2+v QgKAoATDhZGlNxvEDJ/jaNHBmgiOmbqaNR5stIo= X-Google-Smtp-Source: APiQypKobWJy6461TklW0KU7ffLpprAwYNYxExJkU1Rfy13OwvjYhttsGMFZ3eYzVwnT+ffq+7jxO3kTvm2WARS5U00= X-Received: by 2002:a63:754f:: with SMTP id f15mr20404304pgn.89.1587467241404; Tue, 21 Apr 2020 04:07:21 -0700 (PDT) MIME-Version: 1.0 References: <20200420070508.645533-1-fengli@smartx.com> In-Reply-To: From: Feng Li Date: Tue, 21 Apr 2020 19:06:55 +0800 Message-ID: To: David Marchand Cc: Anatoly Burakov , Li Feng , Kyle Zhang , dev , fanyang@smartx.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 21 Apr 2020 23:55:10 +0200 Subject: Re: [dpdk-dev] [PATCH] eal: add madvise to avoid dump memory 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi David, Mmap with PROT_NONE does not affected the core dump size. Here is a simple test prog: #include #include #include #include #include #include int main(int argc, char** argv) { // FIXME(fengli): XXXXX uint64_t gb =3D atoi(argv[1]); void* ptr =3D mmap(0, gb << 30, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (ptr =3D=3D (void*)-1) { perror("[-] mmap failed with MAP_PRIVATE | MAP_ANONYMOUS"); exit(1); } while(1) sleep(1); return 0; } Thanks. David Marchand =E4=BA=8E2020=E5=B9=B44=E6=9C=88= 21=E6=97=A5=E5=91=A8=E4=BA=8C =E4=B8=8B=E5=8D=883:41=E5=86=99=E9=81=93=EF= =BC=9A > > On Mon, Apr 20, 2020 at 11:41 AM Feng Li wrote: > > > > Thank you, Marchand, > > David is fine. > > > > > I have just tested your patch, and it doesn't work. > > The core dump file is still very very large, the same to virtual memory= size. > > Please double check that the patch is in. > I remember checking coredump size with my patch. > > This needs more investigation but I don't have time atm. > Anatoly, opinion? > > > -- > David Marchand >