Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3738909iog; Tue, 28 Jun 2022 01:29:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFEJYW+5HIUAJT7zsLg89VAUdaClEG+RG0I9s5uFbGa//ZShbHGdq5z8ZPFOn20Xy6ifl0 X-Received: by 2002:a63:7a11:0:b0:40c:fbcb:2f12 with SMTP id v17-20020a637a11000000b0040cfbcb2f12mr15913718pgc.180.1656404998352; Tue, 28 Jun 2022 01:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656404998; cv=none; d=google.com; s=arc-20160816; b=JZWDN8wZBwSQKrcPZqHxGcVK0y/dPj25MRgtsDFgpYY515qveh8wZVdXcm1lI3rUp1 xBIGhthfsiaIThnyleURuWKFraMh87H3HhdYoRzL4MuSXLJUWusx+MRJF8JxR9X3B2GA P7fapo5a+sfZqPfHPkidVHw4BWad0ULT2n/uZCMIRVRYd0wjL1CF4mZqwZJuHNbJX/VT ygeMeJku1zpzPV0+FlaK3bVLLx4kgASPUANeBzExy/KOYczRWLz6i4wiBUquJQpGB/r9 OzzqgQ1n6YeuUHQYxukmKx0TVc3iVMZBUziPvDiT3slVhQTKP7cJ56xq1zvogTgWE19m iCMw== 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:dkim-signature; bh=UBub0aQrCBJIDUEBVquFwPWBRxEAkuA9d+EzYexwvls=; b=mjqOkwvfAGYtPaN2S2eclMqpubW22F9GN8wQoR6s6GvLd3ZZNN08YhF9j96bD5oPJY UQU0UtDw1zqQ5550DczcrROR+k3Lrst/EqbXZMNJzykz+bq4GMJyONrkzk2mIx+r4cwP oxlP41RboiwWbvtHRUbJ6uw3oBYr3CmTmk/NIg33WFe+R3/FZUzYYaeESbOveYToyBj/ fE6VTlJZR2WZcxlosgpborf2Z6T5Lws8hMi1HKPAlCEX3JKqAPr9G/bFfAD073nW7cIF MaBci/Rm4Zl7uxYRIQeqWUx0FiXlE/+Nr0+Kxrdm6if5lpQDXaxfzPIa+12SQM9qmpJv Pk0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wEECVkQu; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf7-20020a17090b0b0700b001eae72b25fdsi14972255pjb.77.2022.06.28.01.29.46; Tue, 28 Jun 2022 01:29:58 -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=@infradead.org header.s=casper.20170209 header.b=wEECVkQu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243386AbiF1H7J (ORCPT + 99 others); Tue, 28 Jun 2022 03:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243121AbiF1H7F (ORCPT ); Tue, 28 Jun 2022 03:59:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DECE01145B for ; Tue, 28 Jun 2022 00:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UBub0aQrCBJIDUEBVquFwPWBRxEAkuA9d+EzYexwvls=; b=wEECVkQuIW0fyDMwcdKQQ6uSYd n6B0t6s8ej8uDb7HwGiNOXxa73gBiF1JttoDAaTMBHQdawJ72Q51CFToqJsmZ9MKNJxhYSCIw2gWI pQuZEkBvQOeEtGgCwpGjI//62MsSmlYSDoxkWv3PI8IM4Kp/wvOuCoj/hW8jZdq6tJUESqEtKUsAj +35e4UXDcyzHRbx7XUSqoBkxNmIKGLYxDAsKRqhNZCdfS7Ckh1j2D/1hIymRApNWMQK6UxLBy805l rbjJ3/mVB4O6xj4ez7pR9Y5JBCsCzj8LUruokY1i19fDuPSy78fr7102a6qvMBg/EW39F75lKMqEO rNmS4jhw==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o667R-00C6CY-KQ; Tue, 28 Jun 2022 07:58:45 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 52B273003B0; Tue, 28 Jun 2022 09:58:43 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 19614203BF71D; Tue, 28 Jun 2022 09:58:43 +0200 (CEST) Date: Tue, 28 Jun 2022 09:58:43 +0200 From: Peter Zijlstra To: Wedson Almeida Filho Cc: Tejun Heo , Linus Torvalds , "Eric W. Biederman" , Christian Brauner , Petr Mladek , Lai Jiangshan , Michal Hocko , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , Andrew Morton , Oleg Nesterov Subject: Re: [PATCH 3/3] kthread: Stop abusing TASK_UNINTERRUPTIBLE (INCOMPLETE) Message-ID: References: <87ilonuti2.fsf_-_@email.froward.int.ebiederm.org> <871qvbutex.fsf_-_@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Jun 28, 2022 at 12:32:33AM +0000, Wedson Almeida Filho wrote: > On Tue, Jun 28, 2022 at 12:06:29AM +0200, Peter Zijlstra wrote: > > On Mon, Jun 27, 2022 at 06:04:12PM +0000, Wedson Almeida Filho wrote: > > > > > let new_thread = task::new_paused(|| pr_info!("Hello world\n"))?; > > > > I'm still having a really hard time with this Rust stuff, the above > > looks like a syntax error and random characters to me :/ > > Peter, I meant to ask in my previous email: setting aside the syntax for > a moment, do you have an opinion on the sort of things that Rust allows > us to enforce at compile time (as exemplified in the new_paused() > fragment)? So I used to do quite a lot of C++ in a previous life; I think I'm more or less familiar with a lot of the things Rust offers, except it is a lot stricter. C++ allows you to do the right thing, but also allows you to take your own foot off (a bit like C, except you can make an even bigger mess of things), where Rust tries really hard to protect the foot. The one thing I dread is compile times, C++ is bad, but given Rust has to do even more compile time enforcement it'll suck worse. And I'm already not using clang because it's so much worse than gcc. I've just not had *any* time to actually look at Rust in any detail :/ But given I'm the kind of idiot that does tree-wide cleanups just because it's the right thing, I'm bound to run into it sooner rather than later, and then I'll curse my way through having to learn it just to get crap done I expect ... Anyway; from what I understand Rust is a fair way away from core code.