From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 7E28120BD for ; Thu, 3 May 2018 14:38:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2018 05:38:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,358,1520924400"; d="scan'208";a="48000169" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 03 May 2018 05:38:21 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w43CcK5F028013; Thu, 3 May 2018 13:38:20 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w43CcKhS004487; Thu, 3 May 2018 13:38:20 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w43CcKV9004483; Thu, 3 May 2018 13:38:20 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: Wenzhuo Lu , Jingjing Wu , jianfeng.tan@intel.com Date: Thu, 3 May 2018 13:38:20 +0100 Message-Id: <151ad7a96d31c881c28379b66c740cf96f5d2635.1525350577.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 2/2] app/tesetpmd: disable memory locking for bsdapp 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: , X-List-Received-Date: Thu, 03 May 2018 12:38:23 -0000 If mlockall() is called while allocated VA space is bigger than amount of available RAM, FreeBSD kernel will deadlock and need a hard reboot. We do allocate big amounts of memory because of how new memory subsystem works, so calling mlockall() will cause a deadlock. So, disable mlockall() by default on FreeBSD. Signed-off-by: Anatoly Burakov --- app/test-pmd/testpmd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 77490be..38b8b7a 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2615,6 +2615,13 @@ main(int argc, char** argv) latencystats_enabled = 0; #endif + /* on FreeBSD, mlockall() is disabled by default */ +#ifdef RTE_EXEC_ENV_BSDAPP + do_mlockall = 0; +#else + do_mlockall = 1; +#endif + argc -= diag; argv += diag; if (argc > 1) -- 2.7.4