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 B6556C433FE for ; Thu, 17 Nov 2022 01:17:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3C8D78E0001; Wed, 16 Nov 2022 20:17:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 379306B007E; Wed, 16 Nov 2022 20:17:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2680C8E0001; Wed, 16 Nov 2022 20:17:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 1381A6B007D for ; Wed, 16 Nov 2022 20:17:38 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D8751AAE7F for ; Thu, 17 Nov 2022 01:17:37 +0000 (UTC) X-FDA: 80141171754.26.56BEF14 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id 662A340007 for ; Thu, 17 Nov 2022 01:17:37 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5E03A62074 for ; Thu, 17 Nov 2022 01:17:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5C62C433D6 for ; Thu, 17 Nov 2022 01:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668647855; bh=FrsXWqBu4gvIaKhys8LdfsPVwjs8dNFipmoB3pcYAKU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BawOxuM2Rn6fTJjYIN1eebmiWe2wwephtklSgC8aV+oj4TRKqjFwwAM5RC0A9gSiP U10PdtCNMecSQiSg9TtQpjthvQFlzcrrFah2ZTiLdo/Zmg+GxkpY6Bxt2r+hbyKRaT EfBTcrx6yECo77fWZjroePxiCP80fpwORxviTf16lULvA7XUdSlA3+2zyCfFC3SRBE /AlqmraEIDc5N5DE5ElHLl+6TjA80VVDRljIiEQAENHk6Ft+BWPut7284yMEmFZJ2V qe0KbFNKiI7r2C5HBYu6ONmDiSTh1diDFWM1MTudRWuQtr4njgb+VxADUUb7l/atfb o5JV6z8l6A/+A== Received: by mail-ej1-f43.google.com with SMTP id n21so1389570ejb.9 for ; Wed, 16 Nov 2022 17:17:35 -0800 (PST) X-Gm-Message-State: ANoB5pk7OH3lMifJliVMEdO6WJKrKAr0vlgxAMOY6+0old4IbWh6OkgA qcpUWJYASQMuN9KP/jrsZKNZVdXP0EiK+vZD0CU= X-Google-Smtp-Source: AA0mqf64Y/3xCK9ojAqXcEj6NWPB4yTgygC4UpuRixkfqaiAwD5GI6/j8AfFzMSBzcbg9jjxEIRkyQmX6TUMy2POgBo= X-Received: by 2002:a17:906:fa06:b0:7ae:72ae:264b with SMTP id lo6-20020a170906fa0600b007ae72ae264bmr333150ejb.301.1668647854027; Wed, 16 Nov 2022 17:17:34 -0800 (PST) MIME-Version: 1.0 References: <20221107223921.3451913-1-song@kernel.org> In-Reply-To: From: Song Liu Date: Wed, 16 Nov 2022 17:17:21 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v2 0/5] execmem_alloc for BPF programs To: Luis Chamberlain Cc: "Edgecombe, Rick P" , "peterz@infradead.org" , "bpf@vger.kernel.org" , "rppt@kernel.org" , "linux-mm@kvack.org" , "hch@lst.de" , "x86@kernel.org" , "akpm@linux-foundation.org" , "Lu, Aaron" Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668647857; h=from:from: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=FrsXWqBu4gvIaKhys8LdfsPVwjs8dNFipmoB3pcYAKU=; b=bJZvVtyjlZsCoexlp0hD5s52OK4vhNvHlgFJnGJHIM1Gkq0jRgaSu1lqUsESVD88NixJim gw5/C9tG2G2c8JS6BNBzjLMLYulMCU0QbNYZOGCzEMNyFJJRFdbjKIcn5+G6p9NBJJLOF2 SBVyRbfDRLCuMUiHKR6U4eL+tXzRGv0= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=BawOxuM2; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of song@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=song@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668647857; a=rsa-sha256; cv=none; b=Inq+BTNTNykuqLsSuydw0VfV5FAZSjfbDS5IZopgEG9NnLKEQMj3fuWWQ7ugzpZpZLMtsv RbzM7FK3g5Id94+fgZOaYBhW/JjF4UJ9G5z885mTrP5pms9UzghQ/FqtRMMsLTmg+ftmT1 imciCrqlb5kzR40DY/1F4Ol//V1Q2hE= X-Rspam-User: X-Stat-Signature: 9zknqg5ujkz6r67gkcnnuoohtkqgfxt1 X-Rspamd-Queue-Id: 662A340007 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=BawOxuM2; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of song@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=song@kernel.org X-Rspamd-Server: rspam07 X-HE-Tag: 1668647857-330720 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000012, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Nov 16, 2022 at 3:53 PM Luis Chamberlain wrote: > > On Wed, Nov 16, 2022 at 10:47:04PM +0000, Edgecombe, Rick P wrote: > > On Wed, 2022-11-16 at 14:33 -0800, Luis Chamberlain wrote: > > > More in lines with what I was hoping for. Can something just do > > > the parallelization for you in one shot? Can bench alone do it for > > > you? > > > Is there no interest to have soemthing which generically showcases > > > multithreading / hammering a system with tons of eBPF JITs? It may > > > prove useful. > > > > > > And also, it begs the question, what if you had another iTLB generic > > > benchmark or genearl memory pressure workload running *as* you run > > > the > > > above? I as, as it was my understanding that one of the issues was > > > the > > > long term slowdown caused by the directmap fragmentation without > > > bpf_prog_pack, and so such an application should crawl to its knees > > > over time, and there should be numbers you could show to prove that > > > too, before and after. > > > > We did have some benchmarks that showed if your direct map was totally > > fragmented (started from boot at 4k page size) what the regression was: > > > > > > https://lore.kernel.org/linux-mm/213b4567-46ce-f116-9cdf-bbd0c884eb3c@linux.intel.com/ > > Oh yes that is a good example of effort, but I'm suggesting taking for > instance will-it-scale and run it in tandem with bpg prog pack > and measure on *both* iTLB differences, before / after, *and* doing > this again after a period of expected deterioation of the direct > map fragmentation (say after non-bpf-prog-pack shows high direct > map fragmetnation). > > This is the sort of thing which easily go into a commit log. To be honest, I don't see experimental results with artificial benchmarks would help this set. I don't think a real workload would see 10% speed up from this set (we can see large % improvements in TLB miss rate though). However, 1% or even 0.5% improvement matters a lot for large scale workload. Thanks, Song