Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1600933lqa; Mon, 29 Apr 2024 13:14:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXp5+SfSaJS1tpMDmYz7aiw8JwuB8BTO8wdirhy708g1oWLJaTB7HcGs8zNIfGVZLsm19xfqXh/7CXIbcacWT1QdaTP5RvXSGEHaLC6+A== X-Google-Smtp-Source: AGHT+IHmeGBNWBi3yIb9jKKJyimLPDox/y3DNQbOkTVtJHCAEhBJRaA/D6CkXmIQ5AqjYMggd2QI X-Received: by 2002:a17:906:e21a:b0:a55:b27c:1299 with SMTP id gf26-20020a170906e21a00b00a55b27c1299mr5906839ejb.70.1714421692367; Mon, 29 Apr 2024 13:14:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714421692; cv=pass; d=google.com; s=arc-20160816; b=i9A59D98j5P5VlEhPWIKQ4QtiGIbBjjLjQ81qGe9cmY43M5vnz23v9EitViZgAeWTJ UP0pSyRNH3f92vepnSsfbFcxlVpi0O4b10iMgzR9kR9Iaj4A+VVPeAA92r9XpBPQMMET QlxMyjEqjaF3CkhU4F//vfJkhoTYQTMjvLGY9QTw7INRbTBzEW4jEYt6qxkKTl1i9vpx Iwsz9Achb0OnsLc28F5n4tqFF6/m26LrQ2S1Q1EYGKiN8Fr+kLiSEmaN0CLrjX9D7xCG /U3QutaFNczOjiS7rMBpqB9G4lwZlRNI4UfC5wpD4mf4h1Gv6Rj808KP4IQUz8zAkk1J YBtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:content-language :references:cc:to:from:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=+deoMmPQLG+DLEK4zq4CzULvuFLJy4sLMw5MAgkMKuA=; fh=Y55CfXa67WkwDl1baKlENkqjjXSYlkGHGgHxOtTh+f8=; b=zFZqAjn/sUPXnDu3NvdEUHRNIZcOMh2wcCt5XZz8t+IFfArad0vfSaXaFxO7Xa/+aw P26plHI8urqE9w99iAmi/2APJV2GK+l87KzTTLHUKhD8sRyUtMG5HKXkSkrF1mxaNtj7 i+nKqb2vDNedggwE15xlE+I/Knw9gwiJrIMTRAMyTh6BY/8+S1hKQryrFVrLJOk2ho1y 4mZRPQ0iqxpur3o+vOynOlDh4ZoPEo7pVkMrJ7oaGPx0WebjiO+mK0xjOBLznDD5TDYi T99tmNvHa1aWu5Xu1rUbXWDxWpf89dzTcLi+t9GiK7g10SHSYrfwQZeDtjrNVS2efRDq 0E2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AN1ExH19; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hh3-20020a170906a94300b00a522e8dec86si13854036ejb.583.2024.04.29.13.14.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 13:14:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AN1ExH19; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B39901F21A47 for ; Mon, 29 Apr 2024 20:14:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B77A21411E4; Mon, 29 Apr 2024 20:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AN1ExH19" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23A501411F7 for ; Mon, 29 Apr 2024 20:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714421684; cv=none; b=eUgYZrLc+p+/0Y8cgjiKtgJx/PuLFLd3Xkho6NqfTn+iDeF732+BhpuZxVN4HaxdohxGq6W/VMv1LF2xcx8dOW/8/+qpmTQlXV3asXQ4Cajnkw62XSTmAeOqMuqwnazQ26id2c639eTrHsQWVp2VLBZfPfKfCLRyPA8A4wxczl4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714421684; c=relaxed/simple; bh=pzWtP8kr7lgSEV6tOy+qZ54glXeeWEPyNWM+bjA9ewA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=ij0G0jN+cQwI5wUw8KIk+KpfqNa6/2NkbQL9EM8W7uDlx2JRTbdgjllMYhvfKEUYVhszGdfmq3z5qTYYPgaQTzcuPyqjV/oSzyM77z0zHL06rWG0leIAZ8Z+cnpjqD2GnquQN6Qq+b2VpEvCr5PQJwjV1WyDdTGyKeXQeyTyYWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AN1ExH19; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714421682; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+deoMmPQLG+DLEK4zq4CzULvuFLJy4sLMw5MAgkMKuA=; b=AN1ExH19JZcWYULSnT4CdcYWwNZMGhekK1X/FO0utsCCaRAfsdmlbcaQK83pMq/7XqlfUT qTSeAdQ75/vMC0pP8b01dAirin1UODZqBJtopiTHMhZnyrjCmpc+q6k+eAR3Enj5+gKZHb MTVJXIvWfxllVeann3I2y39Ox2Nnpbg= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-549-ixkVsYALML-f3PrTOJW1LQ-1; Mon, 29 Apr 2024 16:14:41 -0400 X-MC-Unique: ixkVsYALML-f3PrTOJW1LQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-34b5bece899so3445686f8f.3 for ; Mon, 29 Apr 2024 13:14:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714421680; x=1715026480; h=content-transfer-encoding:in-reply-to:organization:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+deoMmPQLG+DLEK4zq4CzULvuFLJy4sLMw5MAgkMKuA=; b=LfCW5az1S89YIOVTVXf2M9330LDdC0pLx8qzE+LfHna1Vk2Owtu2RCIi8xuTt9GgnI EhbpzNh4uFbAFM3Z+Wyil02khprZpImdKNHysRS0X4jiQ5TQxc273eiSJilBIE+UCXRO rsuqhAHi1XoPSvum8eOAOcG/yEFNE0/gf0wmFqi0sRsdwUv33HOzy07MgiCTDUY/Gvot 8u7V8xNm4LK4+//8b13D7+a2rmb7rd7k+uVSVkql7B2yT40uTzMmOTm0VZgH/kZ4ADQc kkettWDTsX1LsodNAIhMquFhVkn0Ge2ufmJLv6E7scXJ2MteLHo5Eb6O/ZQ3tTZvxOyz 37pQ== X-Forwarded-Encrypted: i=1; AJvYcCXu41H3NsUWUAZEk8KIhYmchWfHni1p+pDToJd+1z5m8XLxQHWe9EpYdlzhxrX87FbL9WqQlnS3WpEUVAbPDYQMHj+30ysATtf4nPJl X-Gm-Message-State: AOJu0YzdcEhDizWUn/J1mYqNkjCAbIUcxZGgy/5DcXCs6hRBp31EEsK1 rNjR2fcdWLxDZriM/lXBK96LQx0yIizmvMgmmYodBc9vvCwbHLN9Gaxy3MDF4+KzG4FFNuEGj1K WH5fHRPNuCceNQOyUwPrrdxVJE4F0+7uUmO4iFgCk2eUJ4sRlkglqnJ6X0O1usw== X-Received: by 2002:adf:f1cb:0:b0:34c:e47a:c0ec with SMTP id z11-20020adff1cb000000b0034ce47ac0ecmr3962235wro.1.1714421679921; Mon, 29 Apr 2024 13:14:39 -0700 (PDT) X-Received: by 2002:adf:f1cb:0:b0:34c:e47a:c0ec with SMTP id z11-20020adff1cb000000b0034ce47ac0ecmr3962218wro.1.1714421679563; Mon, 29 Apr 2024 13:14:39 -0700 (PDT) Received: from ?IPV6:2a02:810d:4b3f:ee94:abf:b8ff:feee:998b? ([2a02:810d:4b3f:ee94:abf:b8ff:feee:998b]) by smtp.gmail.com with ESMTPSA id d2-20020a5d6442000000b003479bec98cesm30306324wrw.115.2024.04.29.13.14.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Apr 2024 13:14:38 -0700 (PDT) Message-ID: Date: Mon, 29 Apr 2024 22:14:35 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 00/10] Allocation APIs From: Danilo Krummrich To: Benno Lossin Cc: Wedson Almeida Filho , Zhi Wang , rust-for-linux@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , linux-kernel@vger.kernel.org, Wedson Almeida Filho , ajanulgu@redhat.com, Andy Currid , Neo Jia , John Hubbard References: <74cbdaf7-360e-47e3-bda4-4661422a11ae@proton.me> <71dd99fe-0d64-47cc-b367-8fdd4fcdbdca@proton.me> Content-Language: en-US Organization: RedHat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/26/24 12:31, Danilo Krummrich wrote: > On Fri, Apr 26, 2024 at 06:32:26AM +0000, Benno Lossin wrote: >> So aside from being able to use `Vec` and `Box` etc, I don't think there >> are any advantages to using `allocator_api`. The disadvantages are that >> it's another unstable feature that we need to get stabilized in some >> form. So it increases the amount of time it takes for us to be able to >> support multiple versions of Rust. >> >> I think it's fine for you to experiment with the `allocator_api` and see >> where that leads you. But when we discuss merging patches that enable >> unstable features, we should be sure that the feature is truly needed. >> And that it cannot be replaced by custom code (it also depends on how >> complicated it is, but I think `allocator_api` would be simple enough). > > I agree, though I'm not asking to re-enable allocator_api necessarily. > > My original question regarding this series was what's the plan on how to > implement alternative allocators given the changes of this series. > > This series clearly is a huge improvement, however, before it was quite clear > how to implement alternative allocators. Now it's rather unclear. > > It's good that we discuss the options now and I'm also happy to contribute to > the implementation, but I also think that within the context of this series we > should give an answer to this question. In order to get a little closer to an answer I sketched up a patch series [1] to support alternative allocators again and added, besides the KernelAllocator itself, VmAllocator as an example. The patches can also be found in this tree [2]. Please let me know what you think. - Danilo [1] https://lore.kernel.org/rust-for-linux/20240429201202.3490-1-dakr@redhat.com/T/#u [2] https://gitlab.freedesktop.org/drm/nova/-/tree/topic/allocator