From patchwork Fri Jan 31 16:43:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 23984 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8D2B202B2 for ; Fri, 31 Jan 2014 16:44:20 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id w20sf10768137vbb.3 for ; Fri, 31 Jan 2014 08:44:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Kyjb8v0uzwXJWMpvGyPgpnDxmA4GWYYvKA19tFRrne8=; b=MHOukPjqHKsuw4iyDvNE65u6vohIvDPwDiU3fJDxfUVlh1OgtPw+vTxnOQDBTkCFVn tfvzYeBUwgad2cdqcKF7V9RPl40wK+vjDgADEZiof3222ZREt9H2TcTi5nTsLjlavhxB MsSoTrBm2+ItEM9WP/QUbjFXPjmsSCNUeoZJn1uti68YNzDKZZ/MViFOV7UE1yQprMNX JNKOT6+tgnmCP+8f6VexnybeltZwvI5TkRAcfCWygl4Soqrlvy6F3pm0TQVaEGTRcrTj x3BjcBYnqgdGKZKCkLiqsgs7Vz5Qrk2WUE7EKXVcU637JGeNzn2cu/DdesWj3l6kHH8a 59yg== X-Gm-Message-State: ALoCoQk/s0mpubMZ3bncFiAGhb95PAYjwExEJSHw1BmKCg19ZaB3GbDxni4AHH1cG+rybT+DLnSw X-Received: by 10.224.20.133 with SMTP id f5mr2574948qab.8.1391186659909; Fri, 31 Jan 2014 08:44:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.41 with SMTP id f38ls997840qge.55.gmail; Fri, 31 Jan 2014 08:44:19 -0800 (PST) X-Received: by 10.52.76.105 with SMTP id j9mr66347vdw.52.1391186659839; Fri, 31 Jan 2014 08:44:19 -0800 (PST) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [2607:f8b0:400c:c01::22b]) by mx.google.com with ESMTPS id b2si3699072vcy.85.2014.01.31.08.44.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 08:44:19 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22b; Received: by mail-ve0-f171.google.com with SMTP id pa12so3220514veb.2 for ; Fri, 31 Jan 2014 08:44:19 -0800 (PST) X-Received: by 10.220.192.71 with SMTP id dp7mr86454vcb.45.1391186659754; Fri, 31 Jan 2014 08:44:19 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp109851vcz; Fri, 31 Jan 2014 08:44:19 -0800 (PST) X-Received: by 10.68.242.68 with SMTP id wo4mr22166076pbc.32.1391186650773; Fri, 31 Jan 2014 08:44:10 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fl7si11093028pad.316.2014.01.31.08.44.09; Fri, 31 Jan 2014 08:44:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932643AbaAaQoD (ORCPT + 27 others); Fri, 31 Jan 2014 11:44:03 -0500 Received: from mail-ea0-f175.google.com ([209.85.215.175]:41673 "EHLO mail-ea0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932263AbaAaQoB (ORCPT ); Fri, 31 Jan 2014 11:44:01 -0500 Received: by mail-ea0-f175.google.com with SMTP id z10so2445421ead.20 for ; Fri, 31 Jan 2014 08:44:00 -0800 (PST) X-Received: by 10.14.87.195 with SMTP id y43mr25601750eee.32.1391186639991; Fri, 31 Jan 2014 08:43:59 -0800 (PST) Received: from localhost.localdomain (nat-cataldo.sssup.it. [193.205.81.5]) by mx.google.com with ESMTPSA id u7sm38612135eep.11.2014.01.31.08.43.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 08:43:59 -0800 (PST) From: Juri Lelli To: peterz@infradead.org Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, Juri Lelli Subject: [PATCH] sched/core: fix sched_rt_global_validate Date: Fri, 31 Jan 2014 17:43:27 +0100 Message-Id: <1391186607-11247-1-git-send-email-juri.lelli@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: juri.lelli@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (bad format) header.i=@gmail.com; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Don't compare sysctl_sched_rt_runtime against sysctl_sched_rt_period if the former is equal to RUNTIME_INF, otherwise disabling -rt bandwidth management always fails. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Juri Lelli --- kernel/sched/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 210a12a..5c0a304 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7477,7 +7477,8 @@ static int sched_rt_global_validate(void) if (sysctl_sched_rt_period <= 0) return -EINVAL; - if (sysctl_sched_rt_runtime > sysctl_sched_rt_period) + if ((sysctl_sched_rt_runtime != RUNTIME_INF) && + (sysctl_sched_rt_runtime > sysctl_sched_rt_period)) return -EINVAL; return 0;