From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF1204207A for ; Wed, 4 Mar 2026 07:07:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772608022; cv=none; b=HsRkCFHk8BpIdT3eEPSWuZWKnL4HerAUWaFbNMWIU8oC4rsbUJ5bTW8ATaLKu8xTeZgi7YLrxQS+ug/BO6bsv7htGi5mh+pMySQKZHixZNRcpaZOIQIrcgWJRh4numLHWhc3pS2bi16KvSZ/Vii2Ob3VhqmxX4nZZ4UtK5hGMI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772608022; c=relaxed/simple; bh=naiCA3LeE2nZvsbRl7Or5WxBw1xwVNo7LIUY2HWC9zA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HLQd1m9Yq8VbYYGGuKvE2yJuuL3ObS/W3e3G5VbFKRBVtkFUA0zw12YMMoTjtwzgAzKcef5oS20zcDUtLDP4TnR450v6ifGo/PD6BiBHM0WdzH41gLJ6Yi4yIeyDtU2kSXJUiV5rhLXZ0/++QkHYz/iwYucUm7sr6outlOJBk24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ER4LBgVI; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=hd1KozDU; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ER4LBgVI"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="hd1KozDU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772608019; 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=JGAx0sdFbNmwJdnzXjA85tFkN8if0z1MKIULhH0G3Hs=; b=ER4LBgVIkH8bB44TUv196vwajBsqZ2tVwSyDCVEZSsF7idHheihDmW5WMulx93rHa+8bf/ JkmW2t9aVs9xCi6Nu9pHLSZzETMwy9VURYPoLsmrDF6ik13MXRR/BJNR0Vk8hHl2sPktYF tCOzNVGd7R8ueLGBnAl90Qh/F6ckU4Q= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-i1w-rnn-Nju-vqmwKYgocA-1; Wed, 04 Mar 2026 02:06:58 -0500 X-MC-Unique: i1w-rnn-Nju-vqmwKYgocA-1 X-Mimecast-MFC-AGG-ID: i1w-rnn-Nju-vqmwKYgocA_1772608017 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-439b3b408f9so2751173f8f.0 for ; Tue, 03 Mar 2026 23:06:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1772608017; x=1773212817; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JGAx0sdFbNmwJdnzXjA85tFkN8if0z1MKIULhH0G3Hs=; b=hd1KozDU3gTkp4KK8r1XdaJ2oCNIDsQoDyPRiGSyvzMReYdBy38q+7qo9zYgM5NGbj 1NfzFXGPkohF26qZiSYkvJXMVR0V56rLjoki4W83NeWD3m5Xlvsvy3bnRiZDxSG63i2L 9rUELrr4rQLOv1emv6rbcdGC53u7nJaMVJNM6gp+UGW2zXtbXkbY9Frf4jdQuUE1+d4S qVyFqzC/XW4DYFitugPAC/GOp5geYLY2YUV1709zQH67sQgZYGAtlrQsCg5sF1CJytsx DT6Ff4QnK/CGfe8sWiU9f8x5wHXyGHYsmywdeVCObKrHMFmBqe+O2OCgsL6WECU4mEf9 /sOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772608017; x=1773212817; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JGAx0sdFbNmwJdnzXjA85tFkN8if0z1MKIULhH0G3Hs=; b=eukci0x4kbwiU3DxDQZCHmUT+1ZmSAhvh6EwTtdxRsRfcQXTtSDqP8uc5b+NXYBlMT 3x/dxuJlf4tE/7IsT+c4rnOKPS3DSXJ3Gwg8rFiQHwWlHMUlVQASMqh5UEGJMa+EqVYn AnPLAwh0lQq1mEyYnRr4AsTilF0dPmO4SP35T36egPvWP0b8sFwiCbCFWAIAFOAYtzLn /vFTD9yfZXugmRJPACmdyz0WsorgE8hmmINtW6eJK4pcZY0EnVFlKLqVxE2ABdxHqIBW w6emK6TOVYzE/O7utzhnoQM+4NnryBHa067WuyalIYpw13CwzCFuMTIjTGM8LAEp0rf6 y+Jg== X-Gm-Message-State: AOJu0Yx4RHl2vYCxNeR/i27S5OfFoSOt/4dNwOpYIQEMO6ZnBY2UWwSa i1KbWI0w4IpcziU/UFVY+8ptAuyhJUEOpy5AR5Bpp4FnoEv9Rg6Uv/x6Lk2hclLk08XlQI8yo7p P7mY7UMWiboKZN5LX6wAjmmPOB0bGeJfd+8/7ItK5FLIeDN6vnYb7Zt7MV6SrLHZrHw== X-Gm-Gg: ATEYQzybv5qkzV1T2bdUWUB4rbIt9OH/is710SAyMbBtsyTU/R1ERm7iINjv0tKYCQ6 nkpX7VorpeFJQLlUH9hHJEuvmehThkgb5ynAjrhpiWDLkvajk5XQ6aYz/KUF/ZCihQoN6PBdlwt XWnOypdirP2e6ev+846pWjP+M5FNP1DrrpIMBTDUJiMuAN49d+rEi0/HyEC37zFMHnr1p9sDRZd eGCHwuNG6qNPhF43Bh1bLoakURdJMrpubZR1KvrCc758oRpKpt+8Vbp2SThE2fkeIbarYRGoWWE EoDOqEqgx/9Ya0DlqfErZ2ysOI2P3FaW08t7W3LYRx5liPeNpsyRh80wyi/NyAaLoxDum29jBwE blF29AdeHZnNkq+9VjmpQdiNe0LyOgl07ShK4IidYw5KmQ+H9ySU= X-Received: by 2002:a05:6000:184a:b0:439:c42f:10d3 with SMTP id ffacd0b85a97d-439c7fe4df8mr2092605f8f.46.1772608017131; Tue, 03 Mar 2026 23:06:57 -0800 (PST) X-Received: by 2002:a05:6000:184a:b0:439:c42f:10d3 with SMTP id ffacd0b85a97d-439c7fe4df8mr2092563f8f.46.1772608016651; Tue, 03 Mar 2026 23:06:56 -0800 (PST) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.73.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439ab6ebe56sm29730485f8f.15.2026.03.03.23.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2026 23:06:56 -0800 (PST) Date: Wed, 4 Mar 2026 08:06:53 +0100 From: Juri Lelli To: John Stultz Cc: LKML , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Suleiman Souhlal , K Prateek Nayak , kernel-team@android.com Subject: Re: [PATCH] [RFC]: sched/deadline: Avoid double enqueue_pushable_dl_task() warning Message-ID: References: <20260303194120.4102982-1-jstultz@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260303194120.4102982-1-jstultz@google.com> Hello, On 03/03/26 19:41, John Stultz wrote: > In testing with the full Proxy Execution patch stack, I found > I would occasionally trip over the !RB_EMPTY_NODE() WARN_ON in > enqueue_pushable_dl_task(), where the task we're adding to the > pushable list is already enqueued. > > This triggers from put_prev_task_dl(), where it seems we go into > put_prev_task_dl() > -> update_curr_dl() > -> update_curr_dl_se() [hitting the dl_runtime_exceeded() case] > -> enqueue_task_dl() > -> enqueue_pushable_dl_task() > > Adding the task to the pushable the first time. Ah, so in case the task is boosted (or we fail to start the replenishment timer). > Then we back up the call stack to put_prev_task_dl(), which at > the end again calls enqueue_pushable_dl_task(), trying to add it > a second time, tripping the warning. > > To avoid this, add a dl_task_pushable() helper which we can use > to replace the RB_EMPTY_NODE checks elsewhere, and then before > enqueueing in put_prev_task_dl(), we can first check > dl_task_pushable() to avoid the double enqueue. Can't we just return early (as we do already in dequeue_pushable _dl_task()) in enqueue_pushable_dl_task() instead of checking before calling that function? Thanks, Juri