Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp575304rwl; Fri, 7 Apr 2023 01:52:57 -0700 (PDT) X-Google-Smtp-Source: AKy350YVcZ1RP8qbPxtfWw95dWj6PY9rU7mztQDDI7KeDP87PaSsHsck/UQxXFPBfLg/tEieDXnP X-Received: by 2002:a17:902:e742:b0:1a4:fdf9:ee45 with SMTP id p2-20020a170902e74200b001a4fdf9ee45mr2265420plf.60.1680857577574; Fri, 07 Apr 2023 01:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680857577; cv=none; d=google.com; s=arc-20160816; b=T2B/qPHCXMXDf3o8nnbaS0gNwb+lY+ZrdywfiMwbf6p+KOmiuoQtuUb0HvLqBWdw+u 2FFdZBs/ne/+vALALcLi+8ztxh/HU0/L4/pD0L+HTqNAyMVJWzHUYcbArvOba9gb6J5I IvPK3YkWO8kQN+4IEwDSv0QcZ8gjEJHqwYjgwWGW7TxqDWmdtnpQrTNhDcYdpimYick0 bgfiRhWfzp0i6CUcJFJETcS1nnAeX0suuPyrgQMSrPtsRzxg71yoU+E6vc5dvcuJj1dh Z8AzR/FDvr/pJ5kz4vlAF7azCmOx6v46QmfqVygjDUBMKM+Suu/iEvWP0JX+c0iPxgqD +4eA== 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=jHJMUpRuhMUlelEnZK8+DRD6C/ir55kUOiM/K4/4Lfs=; b=09BTdfpZtS0VMTyFvahT7ToynCCfiI0nuMXtgtTp8CElOg3as4+Wd7SLGSWXsl1iAB XVlzuisFmfPEvQB5wLJYeboinGNWCMDYeFXyGwl6/hYvScNZSr9mJ1z31g9Q+V8mezm4 YQAl/RDL1IZQ4ByjcWTeYtRsxnGYmMhvl22lw/SngR0Ik5Gj/0TBJdNxC+ypunQZ6WA0 mgaZEYMdg2rOZWR2+efgMM+9DhPyYZSbS8DBJY+poy3GBIDEDJsxv1w7mMPoh7YzLWGz 0GK8fMrUDFrgdctErrFB+/9dqcf0hI1iMrXx9DYjFqhFKDB3Ha/ksrc40Td+F4QonNqi ML+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=H45JRJMA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lOTj9qBC; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a63130a000000b00513aece9c12si3022046pgl.215.2023.04.07.01.52.44; Fri, 07 Apr 2023 01:52:57 -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=@linutronix.de header.s=2020 header.b=H45JRJMA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lOTj9qBC; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240080AbjDGIo1 (ORCPT + 99 others); Fri, 7 Apr 2023 04:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240006AbjDGIo0 (ORCPT ); Fri, 7 Apr 2023 04:44: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 C449F4EED for ; Fri, 7 Apr 2023 01:44:25 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1680857063; 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=jHJMUpRuhMUlelEnZK8+DRD6C/ir55kUOiM/K4/4Lfs=; b=H45JRJMAr+ngJ5tF1yNnBK9nsYsNbtp9f8b6VZG2LDI1qbJmwE2M3PEoAHGaOVmemHJp4k Ez/M0x0wkEikw3ef3jU5EgAHQqaOF9tMNnt34D4ZI3nPYEgO8qb7+wi1qp1k36rPPQuvFh c9vXm/KnLQQfhhq6b3ITfXjHHbxhDUWeeSuBduYvDo027GMeAok08+HT0WGrZijA+aii1z mROuo1fUouiwBGuQJds2yRdAvEoDn4vGwe1g/RixOYt9jtL72tzriml6x7jCBmg2sbt1jY 2ERJzGd9HQD6RST3PjfvFmNtAl5X5KyvPA5NcuMxqJy3Fk6UzUkYNz87bSnRdw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1680857063; 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=jHJMUpRuhMUlelEnZK8+DRD6C/ir55kUOiM/K4/4Lfs=; b=lOTj9qBCMSqr7dzpOP1JE0OLf1cyletpr6r9AvWUCQuXJInLPzhjnS9wdpAXCY1eCRteUo ytryji7PqWWQLYAg== To: Frederic Weisbecker , Marco Elver Cc: syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Anna-Maria Behnsen , Jacob Keller , "Paul E. McKenney" , Peter Zijlstra Subject: Re: WARNING in timer_wait_running In-Reply-To: <87h6tsred7.ffs@tglx> Date: Fri, 07 Apr 2023 10:44:22 +0200 Message-ID: <874jpsqdy1.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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, Apr 06 2023 at 21:37, Thomas Gleixner wrote: > On Thu, Apr 06 2023 at 00:19, Frederic Weisbecker wrote: >> We could arrange for doing the same thing as hrtimer_cancel_wait_running() >> but for posix cpu timers, with taking a similar lock within >> handle_posix_cpu_timers() that timer_wait_running() could sleep on and >> inject its PI into. > > I have a faint memory that we discussed something like that, but there > was an issue which completely escaped my memory. Now memory came back. The problem with posix CPU timers is that it is not really known to the other side which task is actually doing the expiry. For process wide timers this could be any task in the process. For hrtimers this works because the expiring context is known. > But yes, something like this could work. Needs some more thought, but still can be made work. > Though we should quickly shut this warning up for the !RT case by > providing an callback which does > > WARN_ON_ONCE(IS_ENABLED(CONFIG_PREEMPT_RT); > > and let the RT folks deal with it. OTOH, this is not only a RT issue. On preemptible kernels the task which collected the expired timers onto a local list and set the firing bit, can be preempted after dropping sighand lock. So the other side still can busy wait for quite a while. Same is obviously true for guests independent of preemption when the vCPU gets scheduled out. Thanks, tglx