Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1912619rwl; Thu, 30 Mar 2023 03:21:52 -0700 (PDT) X-Google-Smtp-Source: AKy350aoQ1Otuel+VgA3mBHUBgUX1DJRqK1twOUPtAcXHXiK92lvY9V13wRZlo8fhdp4q9A0YI+a X-Received: by 2002:a17:90a:ba04:b0:240:cf04:c997 with SMTP id s4-20020a17090aba0400b00240cf04c997mr808247pjr.2.1680171711905; Thu, 30 Mar 2023 03:21:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680171711; cv=none; d=google.com; s=arc-20160816; b=Khz+8LXpWxMUoqWRa1hfYzJPXpZoaegAteHXmqArihn44m+rfhJL9a/wPeH1iyfw0e p/gdGgAJl/fdYq5LJzRzd3LK+X38F8oiH+Awurznn1I60BcYByJbbWnSsKwlGVSRq3MG EYMzGr9wsAfF986NVKabw8Ij1nTUBsxdo13vhB0aH/fVBbzLkAurxspkhuMA5zDL8tSv e5E5wGOBpGWESnfKCQiNhr/DV1kqr595mq0eFCPCiDc5MeIOYmXGrgWvVDP6Ngik9AEi ju8LpwV761ZpmXaHcGgOekMXOdTc9h5HprlhJUlXG+k5BJgdT1/NhTLw93sALJyoMjKM vq4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=M4Y2U0FWvmSoCA4G791gIQlcGTXzfS+ytaj/vB6IHj8=; b=gpTD7oguwuCFjn6bIaxy4p+kDDRmJeNN8Ub1/GSjT7Ng/t+a/qA5XTbW64IonnVHek QY16z4CWiZhBoAXCenscW0bNWKMZhNg+nlFQyQePcvzenyc6rvZrkypPo1KBX/GywpZN gWMMLYtnLdL08quzqasrMED5vLiZ06v4KB4wPC5CGz9g5qAbKeqHcPpGuL6trJ/pxx5Q wDYz8m1xuw2Vkz3T6jh4oA0t5qPh5V3wQjkWzhFbc7W0efAzCxF8hbiGpQdLNNF3xwL/ ESZ6keLbEECdZbNzT0i6dbRSbv7JF66Q5Q8T5tpF0upaAHJWWC1RP/vLczif721Mn6x9 I3nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YzxQCOnQ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk7-20020a17090b224700b00233ebd4c537si588pjb.22.2023.03.30.03.21.39; Thu, 30 Mar 2023 03:21:51 -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=@google.com header.s=20210112 header.b=YzxQCOnQ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229778AbjC3KUV (ORCPT + 99 others); Thu, 30 Mar 2023 06:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbjC3KUT (ORCPT ); Thu, 30 Mar 2023 06:20:19 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE7CF7692 for ; Thu, 30 Mar 2023 03:20:18 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id f188so4346712ybb.3 for ; Thu, 30 Mar 2023 03:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680171618; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=M4Y2U0FWvmSoCA4G791gIQlcGTXzfS+ytaj/vB6IHj8=; b=YzxQCOnQFjFHPUjiapHw1RtYtsdvQdPN9v+tXcPIS8UgOpqCidJeCqzRCoOxLn3BZ5 Spve3FZJlZiXCi3Rz2NLamEsPHmxoFXwq2+BFSrZv82KUrB2/Ml/7TgR7hRm+st0nLSb r8/ze+iW/xBgo+IR6IYZOXddoScuqFfLqsgRr+NDG7AOZ741o+ut7cQ4aPY2PFRh1tn5 mLjb8oaVi2SZsWMThZOlJ9pb/BhhDStv/pyj4PNPCUtKDqfpws24Z5wwtyI2ZWWxFLqF nCLA40uJZ1X2TIiVmQ8ClUP7NdA8yteoU95pscy84u8anP3Op0ZEGt+T3M1M0LxFTail hfZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680171618; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M4Y2U0FWvmSoCA4G791gIQlcGTXzfS+ytaj/vB6IHj8=; b=oP7tKvTBRhBUZfxtJJjXyOsuQXz613DApsKujdPPJQ531B5sTXwWhzlItBvmm4nGhf Y+SDzvanyCeSi7+yYkPcUQrJyo+G1ZOuFIQDWu53U2z0ffk6RRxZ35N2jSHhOZvJtGkv JWkrWylICLJHpmaiA4buGttHOiz9RqtReCRH+P7E5QqC+1sdLpSCd/mJg7Nd5IAVer5c hiL45cPA++ppmgw/Z61sdZyya4hCM5DHy02UV38/MMH+vgBaqdJPFkkYRyE+/Vbsu4v0 yy9C4Wtepi7MwSI26zGiaM8Xg7kGbf8AS7Dk0tpNudvlWE+AV+9F2fF/fm7GD01Lv4HC cgNA== X-Gm-Message-State: AAQBX9dC/hGGKxGXUushlMv+294YoXRB0BKJsj40jej2YRQGOEmzVJuC H/pAHoQQzArJA4ujKLLGZ8j9DhvjuKnUe/iRsB+5jg== X-Received: by 2002:a25:16d6:0:b0:acc:1061:44a with SMTP id 205-20020a2516d6000000b00acc1061044amr16607531ybw.50.1680171617974; Thu, 30 Mar 2023 03:20:17 -0700 (PDT) MIME-Version: 1.0 References: <20230316123028.2890338-1-elver@google.com> In-Reply-To: <20230316123028.2890338-1-elver@google.com> From: Marco Elver Date: Thu, 30 Mar 2023 12:19:40 +0200 Message-ID: Subject: Re: [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread To: elver@google.com, Peter Zijlstra , Thomas Gleixner , Ingo Molnar Cc: Oleg Nesterov , "Eric W. Biederman" , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Dmitry Vyukov , kasan-dev@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-15.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Thu, 16 Mar 2023 at 13:31, Marco Elver wrote: > > From: Dmitry Vyukov > > POSIX timers using the CLOCK_PROCESS_CPUTIME_ID clock prefer the main > thread of a thread group for signal delivery. However, this has a > significant downside: it requires waking up a potentially idle thread. > > Instead, prefer to deliver signals to the current thread (in the same > thread group) if SIGEV_THREAD_ID is not set by the user. This does not > change guaranteed semantics, since POSIX process CPU time timers have > never guaranteed that signal delivery is to a specific thread (without > SIGEV_THREAD_ID set). > > The effect is that we no longer wake up potentially idle threads, and > the kernel is no longer biased towards delivering the timer signal to > any particular thread (which better distributes the timer signals esp. > when multiple timers fire concurrently). > > Signed-off-by: Dmitry Vyukov > Suggested-by: Oleg Nesterov > Reviewed-by: Oleg Nesterov > Signed-off-by: Marco Elver Gentle ping... Thanks, -- Marco