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 199CDC36008 for ; Wed, 26 Mar 2025 16:16:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A5225280095; Wed, 26 Mar 2025 12:16:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9FEB428008D; Wed, 26 Mar 2025 12:16:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8EE12280095; Wed, 26 Mar 2025 12:16:00 -0400 (EDT) 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 1872C28008D for ; Wed, 26 Mar 2025 12:15:59 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B051D1A0BFA for ; Wed, 26 Mar 2025 16:16:00 +0000 (UTC) X-FDA: 83264203680.05.FB9E396 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by imf23.hostedemail.com (Postfix) with ESMTP id 8305514000E for ; Wed, 26 Mar 2025 16:15:58 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FljL4xVO; spf=pass (imf23.hostedemail.com: domain of alexei.starovoitov@gmail.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=alexei.starovoitov@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743005758; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/fF58Ag1wphZzn6pMqlzMhuHlw+JS4kycZnZ4uyMNWo=; b=nly7KQRn6ZWT/sO5YNSsW0M11INIp0gqd52yEcar9DSZdECmqkSKJJZyfRO1wkiP9VSpH8 nMus3tTfvXGP+BKxv9I2KUEUv0FazdJYxhsjmqLpg9VDiHx6P0rGrgzqORgaA9RKOr6Ub9 HhdLR8IG4pipO04gLLOxWD95GsfJCqY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743005758; a=rsa-sha256; cv=none; b=i9yHCyvvAetOoFpafJLhIKpWNjiqVSwDG0pd5byLZj5+LSSUmXKbYNlEqE9VAGVARV1wfn WAgBjs3kJmMa5mb1ZNirNtPziLgkelnI3sXfM12E0sXzUmK81UHZpJtxk1wxLf2LCi7yl9 8IlbP1OgyQjwnsSDdoyefYeXBd0WWx8= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FljL4xVO; spf=pass (imf23.hostedemail.com: domain of alexei.starovoitov@gmail.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=alexei.starovoitov@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-39ac9aea656so1836300f8f.3 for ; Wed, 26 Mar 2025 09:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743005757; x=1743610557; darn=kvack.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/fF58Ag1wphZzn6pMqlzMhuHlw+JS4kycZnZ4uyMNWo=; b=FljL4xVOPOdfAOE25DtJpVT2l8EKcnPZIecn1tHkFGuo3ojZflF+ZVRjllQJhB2+lF e7HnxzIf0W/U5gllZZMeU71zY5EG2Wg3N2+NWqjGXVKHvuJ8rgtUQaiHoEeqygV9+RjT og37DXP/qmfMc2yI5wYB4rBRFSmZb5YKFotF3R2ymwv+fUR2Ra/V9mBLR7zNsSNF3Mrv bP3s4QCziB/GJM4CEngIBpT4kTv6NiJ3WyYU82kIkALIzoJS1en4aLknMSBj6SKv+Q07 4d4pfk1xVZyMa0QMRwMc1TW1XJpPr3GoJ1+4Gizti/A3M/1IaozBwBzywqFHG2xavsxw G52g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743005757; x=1743610557; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/fF58Ag1wphZzn6pMqlzMhuHlw+JS4kycZnZ4uyMNWo=; b=nK/1oKO3bKtj9PGsbUl890weF9lI2367y97z6d+WkBUOYy9SPlUFBB0unry9WM1JYe HqWi2gdSm9LFXLzpKMujqJN0SHKeXwzQXLnzyw82ve9LLJGqlQLHFXYEBUEsR+vnykNR 1OKsqg0IT1EWZeCtdc6swOhvPj4Lafy7hN6OnL2Qxgz36cCfYxuTCB0Wjiy/uj0u7OTw +WlBM0HDoYVYT613ZNl1U8GWm3Rz0hXMhj8e+1RKoOE3cLB9n1PDzL1665jUM79JtXyS KZj9FRneUWH65S15Z5Qj0uIp5o/HzHgVTffS6cskhBSxACo8TYfoVTslPrc0K/f6YJpD 7vIw== X-Forwarded-Encrypted: i=1; AJvYcCXcPz455/bHT2dm/Ky7YbdFjUex/GEsV5GMdk9/v9Smj0bbfT0x4hB3QBpTiOrIE99YYa4N1SocjA==@kvack.org X-Gm-Message-State: AOJu0YzbeyIORf+sn6brj9DCnrINZemXbShK7Q7UlnfZgBCq4Ph4980X YVKgO5NrDrTVBSYokA0fdyFTluhLzYtwIEaLRgNAgpxrv9+6/qFX/ykTkgjgyOWos0xW/+5i9v0 xCqK8SElVWB2qX3CDvovn3FrTAElxcZOgYFY= X-Gm-Gg: ASbGncv6lgnYO0IA3gXl2SxOhJBc8WRhlzbjgZUk3NF0kPG6CQfnqT5OQuCCAmvVjes uQ8rfICoMS4EtzzzkvoeJit1NGnghI3rJuICwj7G21MRFENZqCa3IGssTpGS5Ebojqh0/kBGoDp 8mAH8HMlwUAGHeTk5yQBNebhNv X-Google-Smtp-Source: AGHT+IER9kfdQW5+Pn9luuFIOejvnMqs+wW91dXCrH3q9YlG6wZRhXKWkpaamHwFIT2O7Q28L6XXmLU51RwOS6vIg3I= X-Received: by 2002:a5d:5886:0:b0:391:3406:b4e2 with SMTP id ffacd0b85a97d-3997f940d74mr17043728f8f.49.1743005756652; Wed, 26 Mar 2025 09:15:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alexei Starovoitov Date: Wed, 26 Mar 2025 12:15:44 -0400 X-Gm-Features: AQ5f1JohkDRRRSCrvZoHTh5TBlQk9mNw7PfwquS3T_Q4qM-QMvtggO1IlqDxCnI Message-ID: Subject: Re: [LSF/MM/BPF TOPIC] Reentrant kmalloc usable from any context To: lsf-pc , linux-mm , bpf , Vlastimil Babka , Sebastian Sewior , Michal Hocko , Andrew Morton , Dan Williams , Hou Tao , Steven Rostedt , Masami Hiramatsu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 8305514000E X-Stat-Signature: 7nm35smt88entmixwuts4y9795gq7nec X-HE-Tag: 1743005758-413144 X-HE-Meta: U2FsdGVkX1/R64GSQRembCJaLK3Imqy4GPcTmPI5/zWb583BbOXWz53ofu3ctWzW108GoJDnA3xLl0d5lHs257pQdQ0i0K83r8TbnBug6LiHN3aWZerRyA4RJDsE7HpqhJ6EST+IaAabwIoKL5xJK2iPHT0HvSmD1t9U27s7u7pQF+HciAxfLkvM21lmqnOp0TCc4krfFbR+a5FptUpY3P0kK8e6wZRJeiXrWhveFqvNLwmMeTjiNRRZ2a14ZkdMWK60G4GvFkw9EsiWfdTjuCLi0Q59wr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AM3Hf66qNGzh0LHdgsmMbaxTMrhosCo65VkBnksN36QBBsrhVx2D7+UYSc40icT6dbdUKA6KZa/wThZaFs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.065283, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Mar 20, 2025 at 11:32=E2=80=AFPM Alexei Starovoitov wrote: > > A year ago Vlastimil kicked off a discussion: > "What's next for the SLUB allocator" > https://lwn.net/Articles/974138/ > > One of the proposed goals was to adopt slub allocator to use cases > where bespoke allocators are currently used either due to > performance requirements or context restrictions. > bpf_mem_alloc, kretprobe's objpool, mempool were mentioned > as initial targets. netpoll should probably be on that list too. > > Performance might be addressed by sheaves > while context restrictions are more difficult to solve. > bpf, kretprobe, netpool don't know the context where they > might be called. Currently bpf, kretprobe handler preallocate. > Preallocated pools pin memory to one subsystem make it > unavailable to the rest of the kernel. > This has to be fixed. mm subsystem needs to own, share, > distribute the memory. > > Agenda for the discussion: > - discuss and agree on problem statement > what is being solved, why, requirements of the solution > - discuss pros and cons of the existing design that we > made a bunch of progress on > - brainstorm next steps Here are the slides from the talk: https://github.com/4ast/docs/blob/main/Reentrant%20kmalloc.pdf