Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp448712pxu; Thu, 15 Oct 2020 07:59:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpDd+1hB9U4CLIPFwST+zF8bL2CI26nZ+OxVrscD6VGnncUt4uWHSnmNNgAgsKt4GgRpEy X-Received: by 2002:aa7:cb8f:: with SMTP id r15mr4891057edt.356.1602773994464; Thu, 15 Oct 2020 07:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602773994; cv=none; d=google.com; s=arc-20160816; b=WmOLw5OxTy588o+qR9KQOFFwHdYO89VAY7W5B//MOV7qXfZ+DM3QGRMp54hrg12X5Y LSMMhRF+P0wt4H2pzjpjDhRR8iB5L5tpz1qop9foN+vgwm4LvgKQ0cLYsRjjNRSmYCr6 gQVRuflOs30qx0Bwph9bMx6OGbLOw+6tUt4xfNkyhoo6Gp2UqLxMvIVaTxelO9U3/Nqw 9tiOS3Lv49tzq/yqtJcXWf/ec+ynH2+wmtJNj3BtZpN7x9cCot6Qmk09OqkPcQ8cCfpi mGlkA5/UvtQ9+zApc1++/1p6B4xjoU0+RhZih7z0eYkV8cX9EOQLhzws6+zQHAvxLNf+ KuKQ== 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:in-reply-to:subject :cc:to:dkim-signature:dkim-signature:from; bh=ubYf3uIUdQo/Q6bT+xRjgGp11qUFxlJTueT4HYtcveA=; b=L7rzpqapvk0pQT4JG4IQVhlxKKNEL5P/QMzGDvAwmKFtlCuhZid42bSXPqca1IWlQi W4k/OLkScKhZBAkt9uwsYtEI2RM/LQgiKUQuiRrrt+nVSNmgQM5dsmGm9+YK0Pnfi9lC PlZi1oiVwf9KCNApE+6NMQY6yejzfN8e6oraXZtY/oOGtZyACzpY5zveyCwJubdeYo8/ zj8n3+XdYRZyUj9ocekgb+ZWpCp+YNHCBzB6D+4Wz0MvXTmzxUcRbweojXaCOUxsfCfy d1Pj/BAKoDlw6Iex2op3uvq6CAB/9jLUJuxEhOTjmHJ4/plVxHLs/2G5PwzjFvmgCK/9 iPzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wSh6lUkY; dkim=neutral (no key) header.i=@linutronix.de header.b="Cp/bi64b"; 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 b20si2247240edw.38.2020.10.15.07.59.23; Thu, 15 Oct 2020 07:59:54 -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=wSh6lUkY; dkim=neutral (no key) header.i=@linutronix.de header.b="Cp/bi64b"; 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 S2389386AbgJOOyX (ORCPT + 99 others); Thu, 15 Oct 2020 10:54:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388348AbgJOOyX (ORCPT ); Thu, 15 Oct 2020 10:54:23 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE74C061755; Thu, 15 Oct 2020 07:54:23 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602773662; 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; bh=ubYf3uIUdQo/Q6bT+xRjgGp11qUFxlJTueT4HYtcveA=; b=wSh6lUkYEO1tc7RiI88tbavWABCiJVEC6E3Kw0RReu+RntJxLXRtEVIuyng5FIs0U6lQb2 P9VxdfdOeWxt/YhxzbdSFvdfSmEHiFcS5OHxcyEkIZOOT5psTnoGXzJTRC49HDRK57Ni0L RM1G/CroDEur8WHKZnsAbcI91/fIbjMweUGL2C/v4ldmTl+QXLMQo24Gd06EwC25LELvfb AEs8aaiti+tvYYGOBR1CYN7bgE/24HrmzmxskTVBy4ctSpJ0zybfxpHPeTFaR5+lrrqein xPok/m+ShBlgCitTumM2H4kSoHv+dq9i1umBO65QJuOYLlbhPfnDsdLk0SRofA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602773662; 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; bh=ubYf3uIUdQo/Q6bT+xRjgGp11qUFxlJTueT4HYtcveA=; b=Cp/bi64bNNhdtVgNKP9ydTyMRMnC2HdODscc295c+nChqeID73hDstALv1QQGkMxiwfGTC OF27e7FgW7FIveAQ== To: Oleg Nesterov Cc: Jens Axboe , linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, peterz@infradead.org Subject: Re: [PATCH 4/5] x86: wire up TIF_NOTIFY_SIGNAL In-Reply-To: <20201015143409.GC24156@redhat.com> Date: Thu, 15 Oct 2020 16:54:21 +0200 Message-ID: <87v9fbv8te.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 On Thu, Oct 15 2020 at 16:34, Oleg Nesterov wrote: > On 10/15, Thomas Gleixner wrote: >> Instead of adding this to every architectures signal magic, we can >> handle TIF_NOTIFY_SIGNAL in the core code: >> >> static void handle_singal_work(ti_work, regs) >> { >> if (ti_work & _TIF_NOTIFY_SIGNAL) >> tracehook_notify_signal(); >> >> arch_do_signal(ti_work, regs); >> } >> >> loop { >> if (ti_work & (SIGPENDING | NOTIFY_SIGNAL)) >> handle_signal_work(ti_work, regs); >> } > > To me this looks like unnecessary complication. We need to change > every architecture anyway, how can this helper help? You need to change ONE architecture because nobody else uses the common entry loop right now. For those who move over they have to supply arch_do_signal() anyway, so the extra TIF check is not a problem. We really don't want all architectures to have the same thing copy&pasta'd. That's the whole point of common code to avoid that. Thanks, tglx