Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2713808iog; Mon, 27 Jun 2022 00:59:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vvjz95I8CCSewYCvUlqU5G8c7NDf5FUtWUCQjQA1MHbi5+GRi5hllD2yp0jz8S8LejRB92 X-Received: by 2002:a17:907:7810:b0:6e7:ef73:8326 with SMTP id la16-20020a170907781000b006e7ef738326mr11476263ejc.429.1656316745377; Mon, 27 Jun 2022 00:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656316745; cv=none; d=google.com; s=arc-20160816; b=rIbWOnT3Sf66lmOjA8NRcxab1IcbaQD7OLZ1bqugQc4XBdUa8TWxJIUKLvSa8PV43R Btv9A+/kq7vwFdV+axc39xWKuAmM7gheLa5woe5NQoBM8rnzJtOH0EIxwEe8oo2ow8VP g8E6BAV0pRYFk8HMvf92Q/yWMIpKOQM9owyswF1Qzug+ReeIvAYDYAqtotDqV3yLTyIk n5U5j7Y7d7e1e1XLWbJ4zHtnBe27/7SzkAUvbBlV5udROHQALzPuOeYW3HpYS59KgIMj vc+P22292GQgug7Pm/VN4xbmenmCUAc4pza3mQ81MFKiIs3IYIrbbtPNodKKBm2CJxUU /hpQ== 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=+ZCPahz/TSdJ6Ok3pImgDQ4xDIYfyX3LQ2pkho0vEek=; b=bksZXAWLB0EwjI4fuDpnszyvDXgUwiefaNFvCk2e892xyQy3JSsqiDQtDN4CODFMhB 8nuhPNhYVWl5jAfFhYAgQZWhCMELwsiQgOUI1iNMgWRDiS1nsQeqBMoHxrP5jkgmwZHx NOXzwh3fbAEaJEgcp3jBpfn+5/3LWlUl66JjH1k4JlXQxGMZB0xcIVuM3IA25uoaEvbU I2gjHyML4loudwAiT2tejBDzFX1zOEx5OLx0glDW2c101pgb9LOm61jCq6xwbTr4Qqd+ BEB0EwK8EfBnkouz/LCYrA5G93//NrffC0atUwWHF2Ona7k7EJxAY+6ToUxsGIFmnaX4 ZhCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=h+4Ls9pc; 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 bh2-20020a170906a0c200b00726bd755998si458789ejb.967.2022.06.27.00.58.40; Mon, 27 Jun 2022 00:59:05 -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=desiato.20200630 header.b=h+4Ls9pc; 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 S232627AbiF0HXC (ORCPT + 99 others); Mon, 27 Jun 2022 03:23:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230096AbiF0HXB (ORCPT ); Mon, 27 Jun 2022 03:23:01 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D47C5FEA for ; Mon, 27 Jun 2022 00:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=+ZCPahz/TSdJ6Ok3pImgDQ4xDIYfyX3LQ2pkho0vEek=; b=h+4Ls9pc4h+2N6iAcVjRTnbTwk qQxcTmJEQkKNzlbp+KdLdwsds2e9TfsBkX5SkUJI5A6oQl9mViz3tnFQjosCoiTKvYAoK2b3nI/Im XhZofjuL48lJDObSWDw/AXG+L4ITVdegSfFSfRrxeqwNGdw/VWc9T625wAe8RavzYmjTFe76AuU3e nlGpzFi3r/VXZJFJXknEVpiDe3hPA6uieV2qDWEpjNzRwUpp9cTGFC2Vl7eQW1iShKoB5qDAJc0Xs k9tGFwFQ3LSCgBHf4w/b32UFZPWNCe3mnu5+gAWcY8mtbOiBX9hDzbQCNFJ1+0WUI/GmfekGntq2G NYH9xDGg==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5j4x-00DNY7-Gf; Mon, 27 Jun 2022 07:22:39 +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 B91803001F3; Mon, 27 Jun 2022 09:22:37 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A0249201833D4; Mon, 27 Jun 2022 09:22:37 +0200 (CEST) Date: Mon, 27 Jun 2022 09:22:37 +0200 From: Peter Zijlstra To: Tejun Heo Cc: 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: <874k0863x8.fsf@email.froward.int.ebiederm.org> <87pmiw1fy6.fsf@email.froward.int.ebiederm.org> <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 Bit off a tangent.. On Mon, Jun 27, 2022 at 05:23:00AM +0900, Tejun Heo wrote: > This is a bit of bike-shedding but there are inherent downsides to > callback based interface in terms of write/readability. Now you have > to move the init code out of line, and if the context that needs to be > passing doesn't fit in a single pointer, you gotta define a struct to > carry it adding to the boilerplate. Yes, I so wish C had reasonable lambda expressions :/ But even if we could come up with a semi sensible syntax and implementation, it would still be many *many* years before we could actually use it in-kernel :-(