Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3016162pxu; Sat, 10 Oct 2020 16:12:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwy5DJxT89RhfT9l/NYcFmB/zHw4Br1DyBwczCNv8ZSWyv3HyHp7Xw4Mrzl3ExAwIVdwcnk X-Received: by 2002:a17:906:fb86:: with SMTP id lr6mr21037814ejb.510.1602371560911; Sat, 10 Oct 2020 16:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602371560; cv=none; d=google.com; s=arc-20160816; b=sNci64ubrzHwgSucFxxaKUobyS8/HrywlK17+SuOMVyqTUJZaKlNSef1jH+n7zGmuw bU3g4PNtT+AmAvkTlTtUHILIO+3NkSsK67ORpgT5D/22kXvy6T043QBhW7i8CnoKIx7m qxaS3vknN+gkV7g4YVlO0qX/I63mGn5eyKyi7jvHRJ2Ft/Ux5ooAXgH/MwlsBNBmQF5/ dUYJhFQpORchF4Ajfz83o9RycmFJSplEXnsxfLoRZirGcu2MQMzMXCpuf/ecjyBm5odx wv6IpqbGc8LEuiMewhr2af9cTsWdVrMX8d7OBaWAt43Oz5bCQnQa8kEwf60vhRiDUkOv dOuQ== 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:references:cc :to:from:subject:dkim-signature; bh=U5tstZmbDyXUeuyJdKt9QDTRSJ8ywOxt/350RTralow=; b=zljE+FhElqRVnHKoXFb0VdvW0fVd2SONdtn40BYgA0YbXN2xYblhdpyVSMQn1jiKmA iB6uJXQp2Q6Zm6DE3Xf/j/NsC8LudeDhpLITMwdPAlwemjQvGoQvUtRlxtjKuKoSDS2W QHj8fI5mLHZUyE6fOricpCDTJjtuwRtEOz8Cs9m8RiLKH1UYEMkK+mz3aulAP2X6HLge xkHm37kz5T+AvRT9G2MI2WJX38tQgD0HKkjvqJmo7xlPW2yztNSK8qi86h8BMfjFKdnH BOjFVNNLZsP9I0r7FdqI/xf8tzaggul4UqbHpGwV/8kQ9CChaetZhFeXmfnmxyaFGrxp R/UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=fV2CRHhh; 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 bg11si8013713ejb.200.2020.10.10.16.12.18; Sat, 10 Oct 2020 16:12:40 -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=fV2CRHhh; 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 S2390257AbgJJW4v (ORCPT + 99 others); Sat, 10 Oct 2020 18:56:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732034AbgJJTj0 (ORCPT ); Sat, 10 Oct 2020 15:39:26 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F859C08E8AE for ; Sat, 10 Oct 2020 09:53:47 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id e7so613040pfn.12 for ; Sat, 10 Oct 2020 09:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=U5tstZmbDyXUeuyJdKt9QDTRSJ8ywOxt/350RTralow=; b=fV2CRHhh/jZjFZgK1JZuqdHlALHsMbDSgonO53L3hZcF/PBA+ICKWfJkPo3keOU4hs HQPwmPc/yBBPsyQRlgbiwL4BH+znU5JatWtHIroIGIs96L4fYlo9m28zkxA9iHn3cNKA yEGWqWdG2ve28AgxSbipJv1NR5+3HwVoX4oqmA5wAgFJSg9XEkxmkwBtQXGCg1q40V29 VSDXj/Ono/DPDFSiyyqiqfVUS0WmTj+Cv0EqL597Vj8BhVNqKg39PvRntNY+1a64prAE Rc2S2CZDVgUUFyNLe3uA7vgnVyOMqNmKSBciIXUX4mCr+zpXTLmXblcIhwR2PhgJtpjj /gkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=U5tstZmbDyXUeuyJdKt9QDTRSJ8ywOxt/350RTralow=; b=CcwWbZIKrAiDxnzjVxYa+ns2RZjFzF8ONhgDnMc4+fIyRHhkxtxKJc4iD6cGAk3X2h uS878JwNApJcYdPamBHNdAwXGq2xmpdS0TMR0Yfxg+JnGjAt/WHoxkAKpZxmAz7/2pmk PsTPUl4qwqM1r0LpVliQCooUqMSCEiN3LjMxX9C64fDhmrLDvGx7Cgh6+drCBaRZj5II w+EFaDLY/3Lh+rIZ5QEhnwQ1A4QxIAi6B8chk3PVVlZdmoydluZGVpJsgRzm6Nph7jY7 Y/I/QdCAvhPrEGcZ3VAR9ckKc/MyYMIxb8RYslTKl7RLBgkQtEJMYQ6orA80ScCjRULF sFiQ== X-Gm-Message-State: AOAM531WpXmi35An81YZ9/Ni/AqP1Kr7XODqTDlg7vNBT/KN/yp+z5x2 B3ETwxN5VupRtaLW32rJQvIZAA== X-Received: by 2002:a17:90a:62c2:: with SMTP id k2mr10477618pjs.78.1602348826635; Sat, 10 Oct 2020 09:53:46 -0700 (PDT) Received: from [192.168.1.134] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id m34sm14606722pgl.94.2020.10.10.09.53.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 10 Oct 2020 09:53:45 -0700 (PDT) Subject: Re: [PATCHSET RFC v3 0/6] Add support for TIF_NOTIFY_SIGNAL From: Jens Axboe To: Miroslav Benes , Oleg Nesterov Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de, live-patching@vger.kernel.org References: <20201005150438.6628-1-axboe@kernel.dk> <20201008145610.GK9995@redhat.com> Message-ID: <9a01ab10-3140-3fa6-0fcf-07d3179973f2@kernel.dk> Date: Sat, 10 Oct 2020 10:53:44 -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: 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/9/20 9:21 AM, Jens Axboe wrote: > On 10/9/20 2:01 AM, Miroslav Benes wrote: >> On Thu, 8 Oct 2020, Oleg Nesterov wrote: >> >>> On 10/05, Jens Axboe wrote: >>>> >>>> Hi, >>>> >>>> The goal is this patch series is to decouple TWA_SIGNAL based task_work >>>> from real signals and signal delivery. >>> >>> I think TIF_NOTIFY_SIGNAL can have more users. Say, we can move >>> try_to_freeze() from get_signal() to tracehook_notify_signal(), kill >>> fake_signal_wake_up(), and remove freezing() from recalc_sigpending(). >>> >>> Probably the same for TIF_PATCH_PENDING, klp_send_signals() can use >>> set_notify_signal() rather than signal_wake_up(). >> >> Yes, that was my impression from the patch set too, when I accidentally >> noticed it. >> >> Jens, could you CC our live patching ML when you submit v4, please? It >> would be a nice cleanup. > > Definitely, though it'd be v5 at this point. But we really need to get > all archs supporting TIF_NOTIFY_SIGNAL first. Once we have that, there's > a whole slew of cleanups that'll fall out naturally: > > - Removal of JOBCTL_TASK_WORK > - Removal of special path for TWA_SIGNAL in task_work > - TIF_PATCH_PENDING can be converted and then removed > - try_to_freeze() cleanup that Oleg mentioned > > And probably more I'm not thinking of right now :-) Here's the current series, I took a stab at converting all archs to support TIF_NOTIFY_SIGNAL so we have a base to build on top of. Most of them were straight forward, but I need someone to fixup powerpc, verify arm and s390. But it's a decent start I think, and means that we can drop various bits as is done at the end of the series. I could swap things around a bit and avoid having the intermediate step, but I envision that getting this in all archs will take a bit longer than just signing off on the generic/x86 bits. So probably best to keep the series as it is for now, and work on getting the arch bits verified/fixed/tested. https://git.kernel.dk/cgit/linux-block/log/?h=tif-task_work -- Jens Axboe