From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (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 3306970 for ; Thu, 8 Jul 2021 23:10:06 +0000 (UTC) Received: by mail-io1-f42.google.com with SMTP id l18so5319743iow.4 for ; Thu, 08 Jul 2021 16:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rBlK2LgfCiccBiJB88gPmnOEfXZ2WxRLfjZj+FvSiBM=; b=jyvryrT52cmvxlZeCtRtaVeb5D5ENskg3tL5rLLy5Yy0kXljj3uvBy6FpqDek/fZ9q FqKgZ1CkcNa7e3JSqpZ5X5uDuR+vfLJDVNFH+JgkYpCpTgVtwrAqb361K29NT3g0v1mv owBUdRYNUbitC+onXPgUMheUFurxbofLEdlpBXE8ux2oaAHbdFoDSWucvHv2rpkW9ZoX dQO/+iIxjyq0jxxZfOCURw4pyCDvjXpdcWSLYsw2XsRV0+Z9L1fGHiD7KxTJmb0Y+dYh 4XwgGnxF77VRYrwHdEWZQ5GhIa+7zkaNLLFLdF5OAjZQDBZOOn7KIqdc3UkKf9U39FUP 4pnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rBlK2LgfCiccBiJB88gPmnOEfXZ2WxRLfjZj+FvSiBM=; b=W9y2z0JByCVOXa9LeWRcP7HyMiqaWu3pzI4RMlS/hn072HAXuv0T9cCN7WrAENDoaI ue78yrzGSzSyVb9SNTdzQBzdWNq1CnzXC+c0vKogM8PRBoAGYQgwN2kmqWKitS/ctY4x TtfoUNPHSqjSHazyLwAyFcA2/Vwz2ttEUhlK1BJ1zks6hdLBfoFhj69Md4diIfaOLomM Fe3FBbVMmYZwkBvYzARzL77X8c83+mqfScT8aSOCUzCSjRdEyEl25rZpN9Hr8zFZZJtZ 38qgDmpHcZpQrajjMIjrjPRqNhY1xMzR6WhxiqQT73k1LcksMek6g8Vx5UsSIaHfb3Tm TS6w== X-Gm-Message-State: AOAM533UbmKKo+lTjvxmILhfHqMCQeZb8QzEMFJdFolcoPMuJsjEaLgC sgb5XLwfCcB2ETrDPP0Q3in+1hbllIyULuwZjNA= X-Google-Smtp-Source: ABdhPJzVsQ7JGTdLGxS8FDEoNwfZJ07ffbLdVXoLHX/yAp2xiZuMLbqMYjhzrCuLLx1EvEG7ejw351S7qiQoOekuwY4= X-Received: by 2002:a5e:d512:: with SMTP id e18mr25904104iom.149.1625785805401; Thu, 08 Jul 2021 16:10:05 -0700 (PDT) Precedence: bulk X-Mailing-List: ksummit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20210707203827.GI18396@quack2.suse.cz> In-Reply-To: From: Miguel Ojeda Date: Fri, 9 Jul 2021 01:09:54 +0200 Message-ID: Subject: Re: [TECH TOPIC] Rust for Linux To: Greg KH Cc: Wedson Almeida Filho , Jan Kara , James Bottomley , Julia Lawall , Laurent Pinchart , Linus Walleij , Roland Dreier , ksummit@lists.linux.dev Content-Type: text/plain; charset="UTF-8" On Thu, Jul 8, 2021 at 8:44 PM Greg KH wrote: > > kref does not contain the lock, but you need to use a lock lots of time > when dealing with them. See my response to Andy for why. A lock may be needed in certain scenarios, but that is because something else is involved -- i.e. to maintain the refcount itself we don't need a lock. Let me give an inefficient, unrealistic counter-example: we could use an atomic with sequential consistency for the refcount. Cheers, Miguel