Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5868232iog; Thu, 23 Jun 2022 07:00:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ubmVguAbS1aPW5bBywaE/0thxD8F6d4uMudCZG6fL16ESrwVNtVXNzuYSQaclt52C5J8lC X-Received: by 2002:a05:6402:2933:b0:435:80dd:f75c with SMTP id ee51-20020a056402293300b0043580ddf75cmr10783380edb.302.1655992807971; Thu, 23 Jun 2022 07:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655992807; cv=none; d=google.com; s=arc-20160816; b=HPiD8MauHucXcnJGylJGsVI3oypWtyCz+lM+56VW0v+xz5bdscRKTTgJufZ5RweU5G iK3v/9s5E2227AfQJcv6hHb0TJDElDc/LZTl+yii8+esa45hN2lP83Sx7dvIRkQFPosB RW0EzRRMhoI9qw1On1Ny1cyRoayCre7z31SHzLNsQxenDMNqcLJWA69mtMxhh59FlACP CK2LdwCVd/VTdWcT3pitZi+F7DF/6XJUEAL2g6pr/V5rlHbv2puUuoSiWhnszcEWUWGa ZdbD5CqNHVvGf32It4HxvQ7IDc0d/EdygEgmOR7D6DY1HJVCAoitq0BUEtaNSzzCJ3MW Au7g== 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:date:dkim-signature; bh=VjGZUuw+pcJYSTHXZzUCFNh3CtV1nbgC2Xpfor/4J9g=; b=Zy2bSa7shT5o/B7oAt8+cm1WUPXXRoBQ0JEYqWymnvscwhmvOKmoB7lnWUDq+8szOb wSp8+hO+yOzXij9CSH8IxOcCylVV3bkmC+4iKnWWv1jJM9SpSi0uEAHs6+HIf1sulEsM I0JK1DF1ydSXVQwX9NZE7CGTlFYW9SM3wjVtqWpznPyZNdX5bvUL6H4+dk8b0cek29gZ f2ErP9t6emS10pDJ3A/pJ/0zjARrVtAa/aEYp6MmmJ/eJu20yQWGkpcvXCxa4trkBf+J xmyR+pTDTX8Ox0+kmzSwUMiG1rJQkv8iDY0++oACWjpaIg/NhtsJWn4zvgraFLki6Rux IV4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CZVrttM1; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u23-20020a1709060b1700b00702d7a823casi22266287ejg.317.2022.06.23.06.59.42; Thu, 23 Jun 2022 07:00:07 -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=@redhat.com header.s=mimecast20190719 header.b=CZVrttM1; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231315AbiFWNra (ORCPT + 99 others); Thu, 23 Jun 2022 09:47:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231423AbiFWNrW (ORCPT ); Thu, 23 Jun 2022 09:47:22 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 678EB3EA82 for ; Thu, 23 Jun 2022 06:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655992037; 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=VjGZUuw+pcJYSTHXZzUCFNh3CtV1nbgC2Xpfor/4J9g=; b=CZVrttM1INXdlqfUFgLvwQVHo/XJCUJeIZvvACDZbrZngXrNJgtVs47MPbgGCYpYmnPpmI X/Gg9Q5iwYIx0Lh29Q0AjMxP+ju0jXi9/kd4P7DFBw/ckz0eSegBJmXFGtx5dLh32h9WJl TQAA8TswITPPigo2GcIoCJ/+33IMyH4= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-63-P8Ste3IpM2mnt9PRQ4wS7Q-1; Thu, 23 Jun 2022 09:47:16 -0400 X-MC-Unique: P8Ste3IpM2mnt9PRQ4wS7Q-1 Received: by mail-qk1-f200.google.com with SMTP id bm2-20020a05620a198200b006a5dac37fa2so23468639qkb.16 for ; Thu, 23 Jun 2022 06:47:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VjGZUuw+pcJYSTHXZzUCFNh3CtV1nbgC2Xpfor/4J9g=; b=wdZ/pwMGYg6qYzZL0TStEYeRmfxFZuUtA6FeuM1WpRKui5YnafSNoSDcEcK99FjScT O8sR9cshId8BghQgC4PrlXIVjv5vBLwGdF3saRplV4QKaQ6DfM0SFdVd1I1cWL4hQsSx JiWteLSTkWFR2e0tEIEY1xKKfptx6zOfDsqmRjI1/8jFLDiiRar5quMlTYOhanps71dQ L0NR/bWRBsJw6xMYu7a4bQVma82GOP7BVjo0j3nRfLAuoklXnAZl6uHjDIIYPFq6idxL wHH7FDH9EIMjjts6MREQq/o5dsMvjMzCvJ2M4lPzOBjogs+PYLlYbY5tq7POj6LZQSyC wuDg== X-Gm-Message-State: AJIora/XqgwtbFm++rLjfCjQDmBEdqrwQUIA1niwGOcEN+/BtgJiwcPD 2zJuMTk2uq4I0VdrvbrpiWbLf+Ba8jSblsOGEE/QR0T8wWW2kv6cyGW4Haj0ZBvNH4ApF310pvr attMklJdpNMkvaBFe7Dh4hDyS X-Received: by 2002:a05:622a:1889:b0:304:f656:6b09 with SMTP id v9-20020a05622a188900b00304f6566b09mr8088902qtc.287.1655992035263; Thu, 23 Jun 2022 06:47:15 -0700 (PDT) X-Received: by 2002:a05:622a:1889:b0:304:f656:6b09 with SMTP id v9-20020a05622a188900b00304f6566b09mr8088873qtc.287.1655992034932; Thu, 23 Jun 2022 06:47:14 -0700 (PDT) Received: from localhost.localdomain ([151.29.54.194]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a0bcc00b006a68fdc2d18sm17822971qki.130.2022.06.23.06.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 06:47:14 -0700 (PDT) Date: Thu, 23 Jun 2022 15:47:10 +0200 From: Juri Lelli To: Sebastian Andrzej Siewior 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=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 23/06/22 12:46, Sebastian Andrzej Siewior wrote: > 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. Ah, indeed. That looks simpler. :) Will test and put a v2 together. Thanks! Juri