Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1427396pxu; Fri, 16 Oct 2020 11:39:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5aryCG3BQcXdTj6rbXYSbnnjyi/gY1oyrGjY39Xlf3MUxZwKvMrq+AULFfoeVgREWU9cQ X-Received: by 2002:a50:8b62:: with SMTP id l89mr5705889edl.132.1602873555069; Fri, 16 Oct 2020 11:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602873555; cv=none; d=google.com; s=arc-20160816; b=KEKGp8wJdCC2u5BF+ATgQ3ep4eusVKmDSW8GKfibjP32YUYPs/RmQ8Bz59nPDDkane +VKLPI5IpaEv4COgff1ZfZLjiD7M6yoF9WwUVzlBOUywsvL9QU3nM810Em5q84aKR/zs wISQHVKCBgsTi0X7Zui5LtydCo1IaJK5ZBj2pZI2gyLLLi2SbWivFcEFP5kqc0ThA6ej 8oyam2hh2Vyf09j4syrcNZnxaXxR3RkROfH8+wM6rEDfSsggsHJn8UvH7drA/jcQNAjQ 7o6I7kd5AjW/8O8WiNHPMRzCCd8aGSMOly7d2OZZLPz3r9JfD7rwSey6di8pC+te3nAl u8eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=XId5jF20WoJucd7UO/O4pOGAuuKjSwAQsDiyHWbeAK0=; b=ihBQAO0LqJa7WkvS02Kr/QUFrD9YroxjP4XRGnGCgJO/m8xFjaiFmGFTSIVfFjT6Z3 xPdscvQLKeLx1QNaB1jaui1XRXD/ziX0Ysd4PnsD0zlQVHwTL5mmxUo+KFB8osQ/xmhH DccKSnRSH3yceybTTvlwrYhz8M1n3yt5rwdWbcCFOkqhxK5i45/l526233y49DcLT86P 5QuwpoeXxgbQFGprHflPWMm+94O5t5qnLGLl7+0+LkoCJiIB9XvhpXu6m+awjfGrTgNE 7JNbHXlmk5k2oD+LJeZBqQVfjnPyZPXj9ag5eBxA0VnN0bOwa7XZrgu67mI1eDToexAG lW1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=0bNM9NwP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu10si2204612edb.54.2020.10.16.11.38.51; Fri, 16 Oct 2020 11:39:15 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=0bNM9NwP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408105AbgJPNdV (ORCPT + 99 others); Fri, 16 Oct 2020 09:33:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407424AbgJPNdU (ORCPT ); Fri, 16 Oct 2020 09:33:20 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 529C6C061755 for ; Fri, 16 Oct 2020 06:33:19 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id j18so1534440pfa.0 for ; Fri, 16 Oct 2020 06:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XId5jF20WoJucd7UO/O4pOGAuuKjSwAQsDiyHWbeAK0=; b=0bNM9NwPbtFkSdLDBoUo/aM0G5yRT9dB58kuUATJYEA+QUGkwEChc5rGMnj64wNBfN e6ZW+CZTl+f4EA4jFl46ZxGdOQaROglNJPCMalxHq/XvwbbsniMMPPk2CcjnHRKOBbF+ T95R6sXAf+6TchEmAak4fWzVqSVxJYCNeBocnyg25iU+Xs9hG5tTcE5Fhuxk3yTo9ISH Oy88F3tdBPv9XbUX9xyWTIDl/8RYO+DbXeetRLvmveStTW/E7E5a6vAnsXPZPmxaydb3 TluEKL8e+zjdrtKGRH+X2Zt2Nfp8Aub80XUqOr4HZqQcC7r7InD6Gz8oRYsevTkzBLy8 f1xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XId5jF20WoJucd7UO/O4pOGAuuKjSwAQsDiyHWbeAK0=; b=XWfCTD3XA+kB7slET8IHIcq//46JgFOWh6tkB93QnhTdi6H3BlZYbRvkjlpXF3Njjv sC4g8utLG2nwg9/0wdVpuA6rC8Xlin7UQL8ChXCpUQ0/c5XzKgJnz6LO+J0f5sUNMTGz L6N0/OT+VD/IEI8T/wWYJvbnElJgAeof548YLZIH6a0qtzGiqVf5E5BOnPnD92U5YCD4 gfRp+Kclf4k0YO0063Ui9i00O5UX6LgCe8CHQBbqDYll6RsPq7NvF2AkK3roxl6e9GhB uA6j/0+WOavLRxaAfa+fOgYarb3jzhOlp17YW2DiO879gLkcS8Dq+vihC/W3owN8CSFi 9ZTQ== X-Gm-Message-State: AOAM531mOgzmoqrQYjaYzVIW4/vRTv/UAWNyS3XXubpESeAwELXXnbP4 Wi3pT9vYrMUOal32wgd0T6CHqA== X-Received: by 2002:a05:6a00:16d1:b029:157:7d81:432d with SMTP id l17-20020a056a0016d1b02901577d81432dmr3759531pfc.38.1602855198763; Fri, 16 Oct 2020 06:33:18 -0700 (PDT) Received: from [192.168.1.134] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id k9sm2978122pfi.188.2020.10.16.06.33.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Oct 2020 06:33:18 -0700 (PDT) Subject: Re: [PATCH 5/5] task_work: use TIF_NOTIFY_SIGNAL if available To: Thomas Gleixner , Oleg Nesterov Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, peterz@infradead.org, Roman Gershman References: <20201015131701.511523-1-axboe@kernel.dk> <20201015131701.511523-6-axboe@kernel.dk> <20201015154953.GM24156@redhat.com> <87a6wmv93v.fsf@nanos.tec.linutronix.de> From: Jens Axboe Message-ID: Date: Fri, 16 Oct 2020 07:33:17 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87a6wmv93v.fsf@nanos.tec.linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/16/20 3:00 AM, Thomas Gleixner wrote: > On Thu, Oct 15 2020 at 12:39, Jens Axboe wrote: >> On 10/15/20 9:49 AM, Oleg Nesterov wrote: >>> You can simply nack the patch which adds TIF_NOTIFY_SIGNAL to >>> arch/xxx/include/asm/thread_info.h. > > As if that is going to change anything... > >> This seems to be the biggest area of contention right now. Just to >> summarize, we have two options: >> >> 1) We leave the CONFIG_GENERIC_ENTRY requirement, which means that the >> rest of the cleanups otherwise enabled by this series will not be >> able to move forward until the very last arch is converted to the >> generic entry code. >> >> 2) We go back to NOT having the CONFIG_GENERIC_ENTRY requirement, and >> archs can easily opt-in to TIF_NOTIFY_SIGNAL independently of >> switching to the generic entry code. >> >> I understand Thomas's reasoning in wanting to push archs towards the >> generic entry code, and I fully support that. However, it does seem like >> the road paved by #1 is long and potentially neverending, which would >> leave us with never being able to kill the various bits of code that we >> otherwise would be able to. >> >> Thomas, I do agree with Oleg on this one, I think we can make quicker >> progress on cleanups with option #2. This isn't really going to hinder >> any arch conversion to the generic entry code, as arch patches would be >> funeled through the arch trees anyway. > > I completely understand the desire to remove the jobctl mess and it > looks like a valuable cleanup on it's own. > > But I fundamentaly disagree with the wording of #2: > > 'and archs can easily opt-in ....' > > Just doing it on an opt-in base is not any different from making it > dependent on CONFIG_GENERIC_ENTRY. It's just painted differently and > makes it easy for you to bring the performance improvement to the less > than a handful architectures which actually care about io_uring. It's a lot easier for me to add support for archs for TIF_NOTIFY_SIGNAL, than it is to convert them to CONFIG_GENERIC ENTRY. And in fact I already _did_ convert all archs, in a separate series. Is it perfect yet? No. arm needs a bit of love, powerpc should be cleaned up once the 5.10 merge happens for that arch (dropping a bit), and s390 I need someone to verify. But apart from that, it is already done. > So if you change #2 to: > > Drop the CONFIG_GENERIC_ENTRY dependency, make _all_ architectures > use TIF_NOTIFY_SIGNAL and clean up the jobctl and whatever related > mess. > > and actually act apon it, then I'm fine with that approach. Already did that too! https://git.kernel.dk/cgit/linux-block/log/?h=tif-task_work.arch It's sitting on top of this series. So the work is already done. > Anything else is just proliferating the existing mess and yet another > promise of great improvements which never materialize. > > Just to prove my point: > > e91b48162332 ("task_work: teach task_work_add() to do signal_wake_up()") > > added TWA_SIGNAL in June with the following in the changelog: > > TODO: once this patch is merged we need to change all current users > of task_work_add(notify = true) to use TWA_RESUME. Totally agree the ball was dropped on this one. I did actually write a patch, just never had time to get it out. > This features first and let others deal with the mess we create mindset > has to stop. I'm dead tired of it. 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. -- Jens Axboe