From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759492AbcJQWSG (ORCPT ); Mon, 17 Oct 2016 18:18:06 -0400 Received: from mga03.intel.com ([134.134.136.65]:56926 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759383AbcJQWRl (ORCPT ); Mon, 17 Oct 2016 18:17:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,358,1473145200"; d="scan'208";a="1071762757" Date: Mon, 17 Oct 2016 15:17:40 -0700 From: "Luck, Tony" To: Thomas Gleixner Cc: Fenghua Yu , "H. Peter Anvin" , Ingo Molnar , Peter Zijlstra , Stephane Eranian , Borislav Petkov , Dave Hansen , Nilay Vaish , Shaohua Li , David Carrillo-Cisneros , Ravi V Shankar , Sai Prakhya , Vikas Shivappa , linux-kernel , x86 Subject: Re: [PATCH v4 15/18] x86/intel_rdt: Add tasks files Message-ID: <20161017221739.GA5978@intel.com> References: <1476497548-11169-1-git-send-email-fenghua.yu@intel.com> <1476497548-11169-16-git-send-email-fenghua.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2016 at 12:01:01AM +0200, Thomas Gleixner wrote: > > + /* Don't allow if there are processes in this group */ > > + read_lock(&tasklist_lock); > > + for_each_process(p) { > > + if (p->closid == rdtgrp->closid) { > > + read_unlock(&tasklist_lock); > > + rdtgroup_kn_unlock(kn); > > + return -EBUSY; > > + } > > + } > > + read_unlock(&tasklist_lock); > > I wonder, whether we should simply give those tasks back to the default > group, same as we do with the cpus. Leftover inherited semantics from the cgroup version. It would simplify the code here (one less error case to handle) if we did drop this. I can't come up with a good reason why we'd want to make the rmdir fail. I can imagine that a sysadmin dealing with an application that is a fork bomb being happy about not having to race to move things out so they can do the rmdir. -Tony