From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227QEg38EQX+4lZhAKjCjdPxqRBb81Yvh8MWCP/c11PLGfIbBUyw9rwUfWD5zh1o8VKHbT9M ARC-Seal: i=1; a=rsa-sha256; t=1516610872; cv=none; d=google.com; s=arc-20160816; b=Br8TE/sVTHR0OhrCmB5z/Fswz3hU7enm/QhhSTZ12sVX56w65dlXRqfhuYl76EfAUH RtAAUjrmvbcOOlf+WEDwGuHt/fb+WjoxuKDMhXi4BipU+2WpJVWlEzCLxd17xjr69E87 MiPVeOP788Ur/UYUEkC3OJS7pSQrO+t53siiRIJBQYXdGkrFarl5+1b6wtDL1mx3A6U7 ynzhJFCp7jH5eBEu1Kp21U7H/c2k72nce7+a5qL3UV5e085329wfIR3oNXbH2wnEJISD 4DItx5PsME4mWZVQqsFyNGk1s9LEXeSEBPXf9luouApERhwCfgOlUSxOOkhW9FPS8Yad 8YLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6/7E9/SAHOrtCvuQCdEQCoTNRIU7FhKQndXMAGSwE1M=; b=XE0FUkwavCoqbh+d4NewJ9bJAPgtoU/uGkYD4F9T7nzDRGMCnHjhwbToueVEsWZpmK RMCkJoTgtmpB7dvEmDdlMJNtPaG45+XPGQ/MAe/uvcJxQeFdyHbsWrdk3NYxAbd2cAoE yZ1Pm4pDCh0+IUS48TtAx9S2NwN5oJQ16TuHnMGOG5qqipCfPjOqsFvFahR+vvQJYcfi zs3Gr62RLeyyUU+Xggd/KkHWmcaszDF7Kji7QLW+fCR9Ii1eVGvVqdqmBhrETL+o9eVS 7KTc9MmaZT+4mUfTU1dkOYrc/72dAj8uaIRftGfGl4lqSah6Eftl4tL4dXjIpoY+8Bab 06qA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xunlei Pang , "Peter Zijlstra (Intel)" , Daniel Bristot de Oliveira , Juri Lelli , Linus Torvalds , Luca Abeni , Mike Galbraith , Steven Rostedt , Thomas Gleixner , Ingo Molnar , Ben Hutchings Subject: [PATCH 4.9 13/47] sched/deadline: Zero out positive runtime after throttling constrained tasks Date: Mon, 22 Jan 2018 09:45:24 +0100 Message-Id: <20180122083926.584172432@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083925.568134913@linuxfoundation.org> References: <20180122083925.568134913@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590281762396790470?= X-GMAIL-MSGID: =?utf-8?q?1590281762396790470?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xunlei Pang commit ae83b56a56f8d9643dedbee86b457fa1c5d42f59 upstream. When a contrained task is throttled by dl_check_constrained_dl(), it may carry the remaining positive runtime, as a result when dl_task_timer() fires and calls replenish_dl_entity(), it will not be replenished correctly due to the positive dl_se->runtime. This patch assigns its runtime to 0 if positive after throttling. Signed-off-by: Xunlei Pang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Luca Abeni Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Fixes: df8eac8cafce ("sched/deadline: Throttle a constrained deadline task activated after the deadline) Link: http://lkml.kernel.org/r/1494421417-27550-1-git-send-email-xlpang@redhat.com Signed-off-by: Ingo Molnar Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- kernel/sched/deadline.c | 2 ++ 1 file changed, 2 insertions(+) --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -723,6 +723,8 @@ static inline void dl_check_constrained_ if (unlikely(dl_se->dl_boosted || !start_dl_timer(p))) return; dl_se->dl_throttled = 1; + if (dl_se->runtime > 0) + dl_se->runtime = 0; } }