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 DB1D9C43334 for ; Wed, 6 Jul 2022 18:21:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2D4616B0072; Wed, 6 Jul 2022 14:21:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 283CF6B0073; Wed, 6 Jul 2022 14:21:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 172796B0074; Wed, 6 Jul 2022 14:21:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 072D36B0072 for ; Wed, 6 Jul 2022 14:21:51 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 9EE4A215F2 for ; Wed, 6 Jul 2022 18:21:50 +0000 (UTC) X-FDA: 79657493580.31.8F18728 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 9C76180060 for ; Wed, 6 Jul 2022 18:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GSSTlT3H81m4KqNdVOSGW8EIu6nu7lK1brf2OVKi6u8=; b=Gbl3nrDK2NCAfsOroqyup0d/9F d0Y1FU6xIGFI6UBkqncwMD0VimqAmcX61IrPfXla+Y2YGPMl4rmmHaOl44UZ7NrTkUrAshkv+0d1Y rpFJC6DckR88QAc6g4eJSYNIUzMMc/FMATzKp6PCUFSoVvSKfuZ+dpXpEpyi2r9es8OOEoHKOzxZa TAd1FNXkZtCEut4H6MGa2zKmQvYK2IDT8VhrDg/s+9T6g+NPCdDtraL2tXNL7ujxVYKifOR2Uyd7J lhhT4ppQu49ThSOmV3XNjTNMH4RgJzBk1LddMqwyWJqGbJ8beGK56PGgYRP9tr6ciNL2O/1hMBL5m P4F1TaRw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o99eT-001rdx-GF; Wed, 06 Jul 2022 18:21:29 +0000 Date: Wed, 6 Jul 2022 19:21:29 +0100 From: Matthew Wilcox To: Alexei Starovoitov Cc: Christoph Hellwig , davem@davemloft.net, daniel@iogearbox.net, andrii@kernel.org, tj@kernel.org, kafai@fb.com, bpf@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka Subject: Re: [PATCH bpf-next 0/5] bpf: BPF specific memory allocator. Message-ID: References: <20220623003230.37497-1-alexei.starovoitov@gmail.com> <20220706175034.y4hw5gfbswxya36z@MacBook-Pro-3.local> <20220706180525.ozkxnbifgd4vzxym@MacBook-Pro-3.local.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220706180525.ozkxnbifgd4vzxym@MacBook-Pro-3.local.dhcp.thefacebook.com> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657131710; 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=GSSTlT3H81m4KqNdVOSGW8EIu6nu7lK1brf2OVKi6u8=; b=E80fD9CtUHvHkOkYSB0tiJFqR9jVjVCMYCeqP0iylpZJyPWD4PnbEHRn3jgE7QlVLIlgvR zrBT0gzAZXCtL5n7yGobdLNG5lhoCt6lS8ENExDIz/wySwAUtL4EW59un2d02WzN04gx4e S7bPors3OifwcJ3xT6F9Xi0vVovCElE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657131710; a=rsa-sha256; cv=none; b=BYCyPDgZgx5UXUpsC/oVPk7M6qKa+IVyJV0w3vSpG1w7fSRne1vSzh/jykBWp5EvEgqz0V OJYWsWtSwRZn2Dp9pcvRBBjFLGB0DOPrKV5W0Woy0V6lu8HOhr/zXlrImgU0DtqtmEsmTs faLVi/fGjS6tYskREkNnqn++6yPa2/w= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Gbl3nrDK; dmarc=none; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: moqf3bh3qo35y4wjit8weegtekayipky X-Rspamd-Queue-Id: 9C76180060 X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Gbl3nrDK; dmarc=none; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam10 X-HE-Tag: 1657131709-690478 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jul 06, 2022 at 11:05:25AM -0700, Alexei Starovoitov wrote: > On Wed, Jul 06, 2022 at 06:55:36PM +0100, Matthew Wilcox wrote: > > For example, I assume that a BPF program > > has a fairly tight limit on how much memory it can cause to be allocated. > > Right? > > No. It's constrained by memcg limits only. It can allocate gigabytes. I'm confused. A BPF program is limited to executing 4096 insns and using a maximum of 512 bytes of stack space, but it can allocate an unlimited amount of heap? That seems wrong.