From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 793E2C4332F for ; Tue, 15 Nov 2022 20:51:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 158A56B0071; Tue, 15 Nov 2022 15:51:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 109E76B0072; Tue, 15 Nov 2022 15:51:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F124A6B0073; Tue, 15 Nov 2022 15:51:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E1ED76B0071 for ; Tue, 15 Nov 2022 15:51:28 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id AE983C0CCA for ; Tue, 15 Nov 2022 20:51:28 +0000 (UTC) X-FDA: 80136872256.16.215F59A Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf27.hostedemail.com (Postfix) with ESMTP id 8B45240010 for ; Tue, 15 Nov 2022 20:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IGXK6UF96sychRMLbJMgNydPQFj7X1SPiOuM3exktqA=; b=mfV6HpJVdJ5wtjNpfJFVtyTK/F hy+0DRIfaJB2hbfOLnf5GMlSG4RN8A61BAk+iJ17mNvnvDg7sPI6uRyWOPuZnKWOV16CguVZuky0z cp+3WkmU9KOQLc2zOcxvy7Foc7eRESjGwkednq6DIPp2QvIhZh8aYd3BXyGrykcY5L3gV/Nimz39U onhQvJ1F8d88EshbWVht/WB1/U6cyqgArduVYmf2wVfQ19up0oU5FFtv9WtS4ARMfPzsqthcvVlOJ mBsEaG5KrSm+5ALGKfDc1Ilt4HgSMjbSDxAeBjQEQuJBFbCInhBHfd62zOUNBBC4nmHdDYoI56jXG mUP/qqog==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ov2tt-00Ek74-F5; Tue, 15 Nov 2022 20:51:21 +0000 Date: Tue, 15 Nov 2022 12:51:21 -0800 From: Luis Chamberlain To: Song Liu Cc: Mike Rapoport , "Edgecombe, Rick P" , "peterz@infradead.org" , "bpf@vger.kernel.org" , "linux-mm@kvack.org" , "hch@lst.de" , "x86@kernel.org" , "akpm@linux-foundation.org" , "Lu, Aaron" Subject: Re: [PATCH bpf-next v2 0/5] execmem_alloc for BPF programs Message-ID: References: <20221107223921.3451913-1-song@kernel.org> <9e59a4e8b6f071cf380b9843cdf1e9160f798255.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668545487; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=IGXK6UF96sychRMLbJMgNydPQFj7X1SPiOuM3exktqA=; b=aIk75qAMMZJt3es41sYwDWvieP+bXAZCLD1z0ICE5EeP5E01HHijfhktKA+F2YPlakYVqa ZYI/T60wUfQhPVCeVxVzUH1ha4CSLaCOf9XXih4MFkcJhoOCPeWJHtB2mkVkpvGIHO3hPe EoKvQyWEC9U6kUD4t3iKCL8/cYco1qk= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=mfV6HpJV; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf27.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668545487; a=rsa-sha256; cv=none; b=AymaZxZIiXSK+QdNacc3ymvSmbUTtL8p8S/PC5oVVdDQUFd3TqjzbWLIkHy1gTlaSvVE/Q bjdN9uC9/kARhfbhDzX1i6YTc0aYrsSaXoDJNjXCza04sA0Hibny48AFm4GpVrgAeE8io9 SNmK0jkAh32wTdBol3tfl87EINO89do= X-Rspam-User: X-Stat-Signature: xnem8u5rnyfsntrmypcdmchdy5c4ba4h X-Rspamd-Queue-Id: 8B45240010 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=mfV6HpJV; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf27.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org X-Rspamd-Server: rspam07 X-HE-Tag: 1668545487-679199 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000167, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 14, 2022 at 12:45:16PM -0800, Song Liu wrote: > On Sun, Nov 13, 2022 at 2:43 AM Mike Rapoport wrote: > > Actually, it would be interesting to quantify memory savings/waste as the > > result of using execmem_alloc() > > From a random system in our fleet, execmem_alloc() saves: > > 139 iTLB entries (1x 2MB entry vs, 140x 4kB entries), which is more than > 100% of L1 iTLB and about 10% of L2 TLB. That should be easily reflected then using perf using a real benchmark, however we don't have such data yet. I have hinted I suspect the reason might be that the actual loading of eBPF JIT / whatever may need to be done in parallel a la lib/test_kmod.c, or having the existing ebpf selftests run JIT tests in parallel, something along those lines, but I see no effort to showcase that. That's a missed opportunity. Luis