Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37531549rwd; Tue, 11 Jul 2023 16:01:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlF7KQhQHm5nzgEPvMxEyOMuruXKRoADY+bXTj4NCCVYrrrQWlKgqx42nWu5+obXFMDA4QzY X-Received: by 2002:a17:902:d486:b0:1b8:a70e:8a7e with SMTP id c6-20020a170902d48600b001b8a70e8a7emr19755907plg.66.1689116516437; Tue, 11 Jul 2023 16:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689116516; cv=none; d=google.com; s=arc-20160816; b=e/1MJ4tSSB9pHRqdmAhWg/L1DxZoBZWd0I4xeAR28Xk2rvyXn0RS/t6ZidJUbVO7dq ZsiFNk0iK0eARlaL7CmS629nCVsAuFwN9DFPTG7xX1CX9xjZbRxIcGf0tN8Xwa0j/DwC YGEAQcS6A+P5EO/LiCm2rebz6JcXUcLJF2tdZr8FSzZxXKHnuD3OONa61xkZgRo/Edi0 I75EpudyIosyARH4tBZP4Yuzyj3RVpPvnXBA5vZLQ7CVfPd7uhChFfBxlY9ZX1IORD1I aIM/Rd07DAFPqBCAnDfMlQ2tAD4a0ioayI+1lfFu23P5JKlQ2qNwTT/HUiJQbr2nL+aL pCfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=GUQ/8zCRZuDXl9Bj16DtG+5Txck+M49Fz3vYnY4FgQc=; fh=vfv3TvFIcwdPDnqhLAINzaWsFcm0y03qTiMNCobxdy4=; b=ISZoeDBiBY9Pjh7qMp+tr4w5iEcne+dAHjkNft49O6DlxoNXYwNaWnY5kK1HKTY8P1 4FObQjXPfFeRKYjtKm8E0U2YCrudv6LAoRUtXo3KYAcjkei3fyVFAyBY4ihwnebqmbS9 ou3vQjZNwcUGgcX7Wby10hqk2pWmFl9unY7//Ob/HvcCbyQ8eSu8fmjEoEjFzvUTcl79 39QwzN9cMu6rPvQA0apnDwFme6rrUn1BmeWItlnpcsCuQnm0+/kvQqTvHEOK/42YwvN3 p7Ljbf7KXN8ExEUGk/b5aCMc64B3BcKVD8k8LWhj3/vYHJhsU7Y3WMsonGliC9umTz+E smBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ARXS4+iJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a17090322d100b001b3c66afaaesi2276328plg.185.2023.07.11.16.01.44; Tue, 11 Jul 2023 16:01:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ARXS4+iJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231879AbjGKWSB (ORCPT + 99 others); Tue, 11 Jul 2023 18:18:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232002AbjGKWR4 (ORCPT ); Tue, 11 Jul 2023 18:17:56 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A62B10DD; Tue, 11 Jul 2023 15:17:55 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1b89cfb4571so46780625ad.3; Tue, 11 Jul 2023 15:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689113874; x=1691705874; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=GUQ/8zCRZuDXl9Bj16DtG+5Txck+M49Fz3vYnY4FgQc=; b=ARXS4+iJF7czWLwSLs3uaant6Rd7iPZWrVB+mB2ZqjJuIlIygjiSudDipepnELI/3x JOhbeMt9Sd8sWzsK/vDruGsWToq1MCbP6+Hp/TboDopRI2RKtdOeg/rjGBmdSs0G5GRf HWq6EIzhbA39r6vmEXpBX+yBAbQKMICh2YQmi0kOqLHzR3AE/Rfpe58PUNNZ5YwfWoIr OldbsoCDG41DMYgsV2dueQGmjKmwClHsMNdKOE8LetFAQ2210Mqs+rGUoFRzhtdyh8+8 DjpBv52aB4BV9qkMoAGMoSRt7oLRZ8RodheH1dNWLH5EOQzQYi/C3G9XxTyUC7Xm1afZ 30qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689113874; x=1691705874; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GUQ/8zCRZuDXl9Bj16DtG+5Txck+M49Fz3vYnY4FgQc=; b=iEKmcU15MKW2oR02dq5POVgXAjpwt8P9pIcchXqe97GLi7jd3CuKWSIF3pRBU4VwmZ XuB7sS+33V3VO989vVRyk+V/eAnp2sCxTrKAppyPw71mI+RZv5f3tI78LwvDN67GBdZe mJc+wCJlRM7nyHvIzp7XsV7f+EtSZqbq18Wv+8MLxVw8ECOs9VycOQvRQShEqxjP8yz1 loDABLkHOa48rQIRPvyoPVXhSeYX3um6EWf8tazITtedpDBrDXTf5rxEcZQGmZXlA845 u9H95qfYz4ReHkDaHuuOZXFyURafji3Zx6P9mhOewrpaXOH47vFFTUVyl+mK105ZPCEs Lvkw== X-Gm-Message-State: ABy/qLbtbgDQ/fMRcLXSx94pN7L2j6EQYyB/XAKpzJ/UdJ02SqTApGWP YZ4pcRLewVVbWVxj3YroVNWLcvdP8ZqzgA== X-Received: by 2002:a17:902:a614:b0:1b8:9225:4367 with SMTP id u20-20020a170902a61400b001b892254367mr15708150plq.65.1689113874468; Tue, 11 Jul 2023 15:17:54 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:9374]) by smtp.gmail.com with ESMTPSA id w19-20020a1709027b9300b001ae3f73b9c1sm2427013pll.101.2023.07.11.15.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 15:17:54 -0700 (PDT) Sender: Tejun Heo Date: Tue, 11 Jul 2023 12:17:52 -1000 From: Tejun Heo To: Alice Ryhl Cc: rust-for-linux@vger.kernel.org, Miguel Ojeda , Lai Jiangshan , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v3 0/9] rust: workqueue: add bindings for the workqueue Message-ID: References: <20230711093303.1433770-1-aliceryhl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230711093303.1433770-1-aliceryhl@google.com> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, Jul 11, 2023 at 09:32:54AM +0000, Alice Ryhl wrote: > This patchset contains Rust bindings for the kernel workqueue. > > One of the primary goals behind the design used in this patch is that we > must support embedding the `work_struct` as a field in user-provided > types, because this allows you to submit things to the workqueue without > having to allocate, making the submission infallible. If we didn't have > to support this, then the patch would be much simpler. One of the main > things that make it complicated is that we must ensure that the function > pointer in the `work_struct` is compatible with the struct it is > contained within. > > The original version of the workqueue bindings was written by Wedson, > but I have rewritten much of it so that it uses the pin-init > infrastructure and can be used with containers other than `Arc`. I don't understand a lot but the part that I understand (Alice helped me a lot, thanks) and the example usages look fine to me. While the interface leaves some workqueue features uncovered (e.g. flushing, creating custom workqueues, queueing on a specific CPU), there's nothing blocking adding them later and this looks like a good place to start. So, from workqueue POV: Acked-by: Tejun Heo Please feel free to route the patches through the rust tree. If you want them to go through the workqueue tree, please let me know. Thanks. -- tejun