Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5722615iog; Thu, 23 Jun 2022 04:11:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vy8j38rOHiyYxMjydU8eIhfK+oNlRJElf7sz72VSm92RKvvxHWVCdb2rPKSFqWGCsAO7iC X-Received: by 2002:a17:90b:3909:b0:1ed:1202:32d3 with SMTP id ob9-20020a17090b390900b001ed120232d3mr1353748pjb.233.1655982714342; Thu, 23 Jun 2022 04:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655982714; cv=none; d=google.com; s=arc-20160816; b=Ps7aFRgl8WiPfwHEFNRdi5c4CEUWn50MzgS70pIk25pQxS2odeKO5K4n5rfEHqOfav rmqO10LWR23NwFDlzLudyOAMELMIHLGniZLevA6bi5EGb4TjsB26GBwIs3RebxoDOA6f bWzL6C923mTJ1uH4jHkiE6NHEnL8qsuIDAijQ3wN2NoZSBmbw8i2sJm2wg7Nr3tyEj+c puQCfOPLWEcziuAEMwpJ2itazhFRalaTwsuwgzsNwgatG4edyRt7LpjiBS689EZmakAw CZOXdScfK8XZLwOBVwuN7hNfnY7nOFEOCYUF6ohFevEhSWrm/Cwc8j/aL2rP4fCb4/4Y /jNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=8nHj+HFfIWxK8CNsjVFreUnM9gLsfriiyE/MKybp4BA=; b=dtM1jqOlZqYvIINbRSOamme4/4Jow1L9vpup02u03OfC7ehwL2UYu0dcjhMOzqmhmm ldMFXWzWOwYrMWbwu0sZ5DE9wvoHeh3RHIDNriuiFKrsKBFuKiTNcg0vhh9/g5IbGCHN au5kvowLeNh+ZtkjmkOjmIaCvYFWdybC0Viq9Oo3Mzv1xld5NmMeUIbAa7hsdvEVwnGe xFDZIVaJPDHwCwRhLINq6eZjJ5yOBG4K9A9m6zfiTW1WgoskXl0oWG1oE6Y+M7QcUN7U 1oFUKUvyQoduYFrVqQY70uszBNLW1cH4fSYuh5LdamF/pi5Cdib9Jx1CVhNROcBGBUWA tQKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xpuNcA8t; dkim=neutral (no key) header.i=@linutronix.de; 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 a16-20020a056a000c9000b0050d690a7272si27992357pfv.57.2022.06.23.04.11.41; Thu, 23 Jun 2022 04:11:54 -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=xpuNcA8t; dkim=neutral (no key) header.i=@linutronix.de; 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 S230429AbiFWKq4 (ORCPT + 99 others); Thu, 23 Jun 2022 06:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbiFWKqz (ORCPT ); Thu, 23 Jun 2022 06:46:55 -0400 Received: from galois.linutronix.de (unknown [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74BAB4B1DA; Thu, 23 Jun 2022 03:46:53 -0700 (PDT) Date: Thu, 23 Jun 2022 12:46:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1655981197; 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:references:references; bh=8nHj+HFfIWxK8CNsjVFreUnM9gLsfriiyE/MKybp4BA=; b=xpuNcA8tDMnQeG7QwGyi2Alc/WV3d54CpW81WbwYlxqk0eEOwA4pyfwSn1UI/wH+vY9nGn 1WLH3NSJsp8PMB1YKHQPragAa43iONvWnrlOFQwykw4eGnfnyAIMmdwUC2V9SAyD7sx/0g +xNwgnvZodMcnRBKVjSJoyVBPskXtmxZnyQXaxGD8iqfACI7kup1QWmUB5G1kZ31+kTBjT TH784R4terqdTO6UZROadTW/PUwg2Hy3CD7i9/aJAEG757Y5+KZ+7wQDh5CnuLbjgQVhNt 3SW1tmGKfDGOKt221/nHEqsSgJKxNzhsG0y+zmxlZzXm4HnybK6QWbo8eIJy3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1655981197; 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:references:references; bh=8nHj+HFfIWxK8CNsjVFreUnM9gLsfriiyE/MKybp4BA=; b=Adb+klKZJpUQmOFLzpUFllVBI2OaxJj5Jome+QdSEQVdjtkav48fEBeBrMOgrpFHGARzSR mX+aHp92QBuEk9Bw== From: Sebastian Andrzej Siewior To: Juri Lelli Cc: linux-rt-users , LKML Subject: Re: [RT] WARNING at hrtimer_start_range_ns Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 2022-06-15 16:53:55 [+0200], Juri Lelli wrote: > Hi, Hi, > My understanding is that we have > > fs/aio.c::read_events > wait_event_interruptible_hrtimeout > __wait_event_hrtimeout > hrtimer_init_sleeper_on_stack <- this might mode |=HRTIMER_MODE_HARD on RT will set HRTIMER_MODE_HARD of might set HRTIMER_MODE_HARD if the task has elevated priority (RT/DL). > hrtimer_start_range_ns > WARN_ON_ONCE(!(mode & HRTIMER_MODE_HARD) ^ !timer->is_hard) > fires since the latter doesn't see the change of mode done by > init_sleeper correct. > The attached patch seems to cure the problem, although I'm not entirely > sure it's the cleanest fix (if I'm right at all about it :). The problem seems to be that __wait_event_hrtimeout() does hrtimer_start_range_ns() instead of hrtimer_sleeper_start_expires(). So if you switch that, then it should go away. > Thanks, > Juri Sebastian