Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1866623lqp; Sat, 23 Mar 2024 12:10:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBMZOFR4ATb3IpyqJGaIgt0cdzzbK7ZU7qwe2Hf2xtbKJUcqX99wEouCl0YMyOdZGf1tjaf9uQMFQSr7RC/Y3RDkZMd2bLz8D5EZhmLw== X-Google-Smtp-Source: AGHT+IHoI1jREILKztXSbSQA3OLf9di+QmZVkjVA9NmupDQf9cqcGQXWPO8n1of84KoKDga9FPbP X-Received: by 2002:a17:90a:ac9:b0:29b:b1cd:4ea5 with SMTP id r9-20020a17090a0ac900b0029bb1cd4ea5mr2761801pje.11.1711221038818; Sat, 23 Mar 2024 12:10:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711221038; cv=pass; d=google.com; s=arc-20160816; b=qRido1rUyLessNK3QEjSmJ53otc9nM5ChKeUuIQak+vDW00XA1cRFmkTkU+d7mpRPd EjLkkWJweNDj+poXaFmWhQw3wOEliwsk6rfGRcYOSrOJnxNiee4OqiROTLsVGJDRCW9d 9pxBwUP09aXewvdb+H7mzGln7iHWylkMvLKsxnuxMbbG7u/AyEv/oCoG+EQlAN99zCAJ 930L/NK0BdjJWPCdubALS0w5bqdYQ9Nd7Ai6SEUCw/0VrxDDR0QAZaJeBngCGUp0Qjnh 9y5CMj/aEaru7R2NxUfN3shjOXqm3Y4fCP8hEZtTPAXQxGPjib+DuM4Wt3QZJSY6LQJ2 2xbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ueCTxwBoM4hJHV9z5OKPHfj7Mct2XSkw55kGkcJ/dgY=; fh=pelfbw/x4y4s6Jc0SvOaJHLfuu40RJcEU5SjhOy1kUA=; b=hM4tHDqNMJjRtjWf/75g0RJcEHt/s+RhMxYp3CCTiYBUIJ5k1Vd4qkt4VTAxqmpFNP IcJnY7CJ8jZ2UFJhpA7EQhktJfYsabKKzKVdGwqAMi7wwttjKwHihJ9HGzubXjipZQRO ceBPsTENbK5z0l69c4Wne+7BlpJ+qFBPPBpa2jR3dxVePU1eZVLJejEWc6tgMpehCyv4 wU9S8bv5PjUaxf0aeTXnCNCANj61yND9Nl59x/STn/6wCyxaAwTNTRynesEuyWiEWdVF YYprqDytHb9rkAtMZcKU6zY0iILx/vBjjgAB7R/MQsRdnpYbt9Ao+VAfbCVxodjSi05f rboA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gH2PGpXO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-112459-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b2-20020a17090a100200b0029c5e28d936si4584917pja.146.2024.03.23.12.10.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 12:10:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112459-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gH2PGpXO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-112459-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 93521B2133E for ; Sat, 23 Mar 2024 19:10:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB67359167; Sat, 23 Mar 2024 19:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gH2PGpXO" Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C34863D; Sat, 23 Mar 2024 19:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711221024; cv=none; b=tficyJZVrPhkJQDz0xXn9VG4B55gZIN30oBgTxL7aeZcrLhNjKnlZ8Qa6zlbTACybbub7gs5lOPudk8rz18cSvv/7ra6TCUtKG9eveCFvVudM/KGErkGgxZW5gas8XgXZp2NEQExmbqwyb8pNawBfykZ/SyW+lWZ7TV4BnhXXHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711221024; c=relaxed/simple; bh=ueCTxwBoM4hJHV9z5OKPHfj7Mct2XSkw55kGkcJ/dgY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YP6nRtunY4KFRs3NqiqSxtuenCKUwcwZAaLhqsmtXVKwWwDt6ndxAs4mIq/aSvo35uvZWMwRg9ewa4oIdxyK6GZlIESgb1vT4tzPJ0NmKUzXwb08OHk7GBqlbkX6BPShNkOvfySvjy92C8xv151uLz1hI/+BKKGAWts1jgJXwqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gH2PGpXO; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-29b7164eef6so2378456a91.2; Sat, 23 Mar 2024 12:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711221022; x=1711825822; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ueCTxwBoM4hJHV9z5OKPHfj7Mct2XSkw55kGkcJ/dgY=; b=gH2PGpXOvYL/AV4fSRqSj4etmY+yAZCC+0xmFq8jzXgvyRHkRSnfKUpscXJ4ghA3EA ef1xQtZ6qODMz1DvjD7ETJPjrJQvh2OxeXx0xGWZIBJsz9T5DhA75z7BVSZ2/6CO6fzX zHjV1Xi8mEj5yQdIqEB5k87wD6dmVVT5gRftt0SOs+ZK3JSgFUtLptCeaGSFP37ycDQ5 u0MOFQSHqB1R3AgaRSf+TDOr+tIHNZ7xISwkwAYORXWhEjIpBGk0tXU1AUUxvtWkTMdT Lq3p0ioCBFEYgi4UXL7ll1URBKqycBD/aTZbjN5NzjifSTgk/YUZZU7Xt8qLKKLaYZkx b2EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711221022; x=1711825822; h=content-transfer-encoding:cc: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=ueCTxwBoM4hJHV9z5OKPHfj7Mct2XSkw55kGkcJ/dgY=; b=qiNj0noY4XUgyZQiTGBC4UwO3YsLINIMOV3H2HeD3DyB81rPD6bBh9zQPqcAXelXbg hIedEN/fNBUd03tFSNjzSJqh9iMxPrDXKp0jLl1hAKW9Tbrexy4bbHl8aB2OpPeaTCaP OWwuwDO+Y2SqVdyaadlX+qJFT7q2FxG+mAXWt/FTobsZEb0JT8VbbaA36MlYeOnp/QUM DWz2je90T+UftSodSWr4PGxxx50OXR1zfcPjMgFsdqG38iv7/IOS7ni2IN46E9/g0F0L 2l1/8xkVbjRooNDVcP4ZRZXIbap+EqreG4ohuz1jvzdCtEjtBsR5eL9vacA7sjgnKvsq JDvA== X-Forwarded-Encrypted: i=1; AJvYcCXbYAc+rW5JobqTAwWKY0S4Bec+I/kGIfhEHXckPdwKvSSjbr2XxuJnASH5EgSpug6KBOsekvsQY3HdRlY0VqXXuC4O2ZqqYSJSg2likVXpZXcsPHgCyhImGAYuBhV5pSMd0jpE+sTiwixnLNrjI0YhNpOFMN1gNjPamh8fFhKQjd2GJA/yOJtOq2BHSeCTdhApNmnA0wJRo5Ovt+ZVxYtXfdN/q7aAqg== X-Gm-Message-State: AOJu0YzPEIFMWKXDTf39W/vZIugo3RN+PF9DGl/mYLUKoUa/ZmhSrW90 PSeCsS6iw6otgKhKnvVLMpdJKjJi8h+l9Q+ZV6qg1mX1lrvjPyP1QXKHKr3ew4VzngisWtwjR1D BMTq50XLBrLobaPikdGadGv7eqfU= X-Received: by 2002:a17:90a:4947:b0:2a0:2f8e:76fc with SMTP id c65-20020a17090a494700b002a02f8e76fcmr2513410pjh.28.1711221021961; Sat, 23 Mar 2024 12:10:21 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240322233838.868874-1-boqun.feng@gmail.com> <20240322233838.868874-2-boqun.feng@gmail.com> <068a5983-8216-48a5-9eb5-784a42026836@lunn.ch> <497668ec-c2d5-4cb4-9c2d-8e6f7129a42e@lunn.ch> In-Reply-To: <497668ec-c2d5-4cb4-9c2d-8e6f7129a42e@lunn.ch> From: Miguel Ojeda Date: Sat, 23 Mar 2024 20:09:57 +0100 Message-ID: Subject: Re: [WIP 1/3] rust: Introduce atomic module To: Andrew Lunn Cc: Alice Ryhl , Boqun Feng , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, llvm@lists.linux.dev, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , Nathan Chancellor , Nick Desaulniers , kent.overstreet@gmail.com, Greg Kroah-Hartman , elver@google.com, Mark Rutland , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Catalin Marinas , torvalds@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Mar 23, 2024 at 3:10=E2=80=AFPM Andrew Lunn wrote: > > Just looking down the road a bit, are there other features in the > standard library which are not applicable to Linux kernel space? > Ideally we want a solution not just for atomics but a generic solution > which can disable a collection of features? Maybe one by one? We requested a few of these in the past for both `core` [1] and `alloc` [2], and we got some which we use (see the `cfg(no_*)`s). It is what we called "modularization of `core`" too. [1] https://github.com/Rust-for-Linux/linux/issues/514 [2] https://github.com/Rust-for-Linux/linux/issues/408 Cheers, Miguel