From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757052AbbBEOZe (ORCPT ); Thu, 5 Feb 2015 09:25:34 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:51148 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605AbbBEOZd (ORCPT ); Thu, 5 Feb 2015 09:25:33 -0500 Date: Thu, 5 Feb 2015 15:25:27 +0100 From: Peter Zijlstra To: Zefan Li Cc: Ingo Molnar , Mike Galbraith , LKML , Stefan Bader Subject: Re: [PATCH] sched, autogroup: Fix failure when writing to cpu.rt_runtime_us Message-ID: <20150205142527.GI5029@twins.programming.kicks-ass.net> References: <54D32AD4.1060003@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54D32AD4.1060003@huawei.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 05, 2015 at 04:33:24PM +0800, Zefan Li wrote: > This is how to reproduce the bug: > > int main() { > struct sched_param param = {.sched_priority=1}; > > if (fork() > 0) > exit(0); > > setsid(); > > if (sched_setscheduler(0, SCHED_RR, ¶m) < 0){ > perror("failed to sched_setscheduler()"); > return -1; > } > > while(1) > ; > } > > # ./test > # mount -t cgroup -o cpu xxx /cgroup > # cat /cgroup/cpu.rt_runtime_us > 950000 > # echo 940000 > /cgroup/cpu.rt_runtime_us > Device or Resource busy That's -EBUSY, but you're changing an -EPERM condition. Neither your patch nor explanation of the matter make sense.