From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 9DCD57DF8 for ; Thu, 2 Apr 2015 14:56:35 +0200 (CEST) Received: by wgoe14 with SMTP id e14so84264420wgo.0 for ; Thu, 02 Apr 2015 05:56:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=Ax+HDjQ+F6JjQY0i9D+MfqIbGfqHqZ4YPvlsIRyzxbg=; b=LXB3WJ8li2vBpOijRatfwz+yCStsP24Pc7GCsR8dqtvSu+TUo8cHvTdy0NlOjlGjIY QvxjTsv+r3IqnAbzWXrW+ivd4LcR9aX/4TtcVfCR/DD/nX0zkXdeoi2LqNwQOKUvdAGG QEHWGzTDMTrHu2nX9XmurbWWKKdF3N1s3+FPxJwAWZ3U/9KAekvhS2PVnGBRSqcjGx2p Tx9f2KKEc6J3V4fV4tRsAvtp8f/cCZ0ZhVrl0BOh/3QydtAI4U+a+R1oMKxqp1ngYtQk eVxhqpyvaufDT0kM8jtdtnW0UJ6saqLbwzqp9YiyRrs81ef+11ck8rRJwZSp+aXcqvRl /RLg== X-Gm-Message-State: ALoCoQnol8HaiuY7k9rdfVWIh/mxLo2Ae1AwApP8RGiCURk9bzo7rsJcu6k2WfOP79WZuqE1VSqg X-Received: by 10.180.109.107 with SMTP id hr11mr24106100wib.5.1427979395504; Thu, 02 Apr 2015 05:56:35 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id k6sm29931008wia.6.2015.04.02.05.56.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 05:56:34 -0700 (PDT) From: Thomas Monjalon To: jerry.lilijun@huawei.com Date: Thu, 02 Apr 2015 14:55:53 +0200 Message-ID: <2705739.59RNFm1sab@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <1427974230-8572-1-git-send-email-jerry.lilijun@huawei.com> References: <1427974230-8572-1-git-send-email-jerry.lilijun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: decrease the memory init time with many hugepages setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2015 12:56:35 -0000 2015-04-02 19:30, jerry.lilijun@huawei.com: > From: Lilijun > > In the function map_all_hugepages(), hugepage memory is truly allocated by > memset(virtaddr, 0, hugepage_sz). Then it costs about 40s to finish the > dpdk memory initialization when 40000 2M hugepages are setup in host os. Yes it's something we should try to reduce. > In fact we can only write one byte to finish the allocation. Isn't it a security hole? This article speaks about "prezeroing optimizations" in Linux kernel: http://landley.net/writing/memory-faq.txt