Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1301219pxu; Fri, 16 Oct 2020 08:42:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgNC34uTfBb10w5eGCL8EE0lIdU4xz1jWveDmaIwzqvWS05SBiP1mUwc+ZG3Nfy+IonbQZ X-Received: by 2002:a05:6402:601:: with SMTP id n1mr4882333edv.240.1602862929234; Fri, 16 Oct 2020 08:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602862929; cv=none; d=google.com; s=arc-20160816; b=tzDGf7Ue6Nsia1p52DuhnO94vv6yechp0R2NjBBcdgoHTVClFKcW0WO5m7N3IHghbT fybw/LcJZVYtoSe8h5ysGlByG9JO7c+TKEQHk8kXdUxdO0dJrwkgibbOuAz/IyuKtNEu smhAuxkAc4cR+9dp4Fi8Oza3QHZmm4bK+9GjP1kTfFI9b83B9AJytQRRX5OPTROQvr13 eyTqHfiEi08ZYF3qGe4m9brwlKvMLemhswG0fcmV8MwLwVCjCJsV9i2jR/Fhx0V055G3 4eDA6RIlUi5IAyzlbZ6+aHtLPd/yOBx3/ABTKM9kop8ccPviM8wC0FS+4GUbNLuOvJr8 kKkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=CxpfhP4r+cT8NbbcIvpC4YffgKWMaBNfTxc0DHUwwGc=; b=IqngCFGqsklqLXvRoVdclWPWR6XqgAJQ9knXyRISkhUy8+BvTscOrDgVVKGY8iPn8R y4puePZGSPqytsX4xVapbR9TCMOqpGp4BVV3D5I4NiUikjt32AekxPZy2QnYfF4GhoXv GIBCxI0VIYOslr/5CmtIuBDu5H9cIOhDwmgjbMgw+6IF1Dt/QRHPt5y5XFHRVJijgkVw r418dqoxDe9u9iLSVhr1gmgIZbIdZUOb77lNalxUg9O63y6RdbBCOIomiol0SPqVegxU RwWeNFcv8WzgjUHl00z1YkwRCyXG6y9JxYtf6kFxd+vLlfuPwXzMYFK1mBrtDonn7wnR ZP9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eK9gJiFj; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si1962736ejb.423.2020.10.16.08.41.46; Fri, 16 Oct 2020 08:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eK9gJiFj; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408621AbgJPOLa (ORCPT + 99 others); Fri, 16 Oct 2020 10:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408615AbgJPOL0 (ORCPT ); Fri, 16 Oct 2020 10:11:26 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FB88C061755; Fri, 16 Oct 2020 07:11:26 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602857484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CxpfhP4r+cT8NbbcIvpC4YffgKWMaBNfTxc0DHUwwGc=; b=eK9gJiFjXBg+fMXP9Y7aTpgCZUbZfPcb/xaC21Rps0Xho4oZ/FC2+ycLes1xlXrsR/Mjaq QdsLaDKiMnRUyK4CiR3Sr9ZSaatQ7Buwj+5tsUNjmOIQaWJ6slW3NANkz5KE+aR7aKq4JP JYYOP4beyqDKyqOnXzMvBF45A7HzQdIiU0ROKTgHlSXY5o9D7O62t5xJQtmQEYo2a7S5EU 4EZ1D8WRM3OOu/qpDBupEM8YzNi3G7WbkUd7ONCO3O31sYK0m9RQAmcZSmJR2S5bxktFYa r3d+M/HEcSldz8CwHZIS1Knw6qM66UnHw6P8ZuOpNILUf/165wOSajIsp0jJAQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602857484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CxpfhP4r+cT8NbbcIvpC4YffgKWMaBNfTxc0DHUwwGc=; b=ki5PSY69rO5yxxsHT4i5xRJKsjbdxshMIh8c8fUbCOG1vmWZIaRYlOz0xSVPS7vnCjl+3S RCI2tUC5ODQOumAg== To: Jens Axboe , Oleg Nesterov Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, peterz@infradead.org, Roman Gershman Subject: Re: [PATCH 5/5] task_work: use TIF_NOTIFY_SIGNAL if available In-Reply-To: References: <20201015131701.511523-1-axboe@kernel.dk> <20201015131701.511523-6-axboe@kernel.dk> <20201015154953.GM24156@redhat.com> <87a6wmv93v.fsf@nanos.tec.linutronix.de> Date: Fri, 16 Oct 2020 16:11:24 +0200 Message-ID: <87d01itg4z.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jens, On Fri, Oct 16 2020 at 07:33, Jens Axboe wrote: > On 10/16/20 3:00 AM, Thomas Gleixner wrote: > I totally agree, and we're on the same page. I think you'll find that in > the past I always carry through, the task_work notification was somewhat > of a rush due to a hang related to it. For this particular case, the > cleanups and arch additions are pretty much ready to go. As we seem to be on the same page with this, let me suggest how this should go: 1) A cleanup for the task_work_add() mess. This is trivial enough and should go in before rc1. 2) The TIF_NOTIFY_RESUME change is a nice cleanup on it's own and can go before rc1 as well. This gets stuff out of the way and reduces conflict surface. 3) Core infrastructure (patch 2 + 3 + 5) of this series Please make the changes I asked for in the generic entry code and moving the handling into get_signal() for everybody else. So get_signal() gains: if (!IS_ENABLED(CONFIG_GENERIC_ENTRY) { (test_thread_flag(TIF_NOTIFY_SIGNAL)) tracehook_notify_signal(); if (!task_sigpending(current)) return 0; } And with that you don't have to touch do_signal() in any architecture except x86 which becomes: arch_do_signal_or_restart(bool sigpending) 4) Conversion of all architectures which means adding the TIF bit. If the architecture folks are happy, then this can be collected in tip, which would be preferred because then 5) Cleanups can just go on top. Hmm? Thanks, tglx