Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264244AbUD0Uwn (ORCPT ); Tue, 27 Apr 2004 16:52:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264349AbUD0Uwn (ORCPT ); Tue, 27 Apr 2004 16:52:43 -0400 Received: from cfcafw.sgi.com ([198.149.23.1]:4708 "EHLO omx1.americas.sgi.com") by vger.kernel.org with ESMTP id S264244AbUD0UwH (ORCPT ); Tue, 27 Apr 2004 16:52:07 -0400 Date: Tue, 27 Apr 2004 15:51:56 -0500 From: Erik Jacobson To: Chris Wright cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] Process Aggregates (PAGG) support for the 2.6 kernel In-Reply-To: <20040426163955.X21045@build.pdx.osdl.net> Message-ID: References: <20040426163955.X21045@build.pdx.osdl.net> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-2136806248-1763408987-1083099116=:632984" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 51070 Lines: 891 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---2136806248-1763408987-1083099116=:632984 Content-Type: TEXT/PLAIN; charset=US-ASCII Thanks for the comments. I made a change and responded to your other comments. Let me know if I missed something. I didn't choose to change the macros at this time - however, I'm not against changing them either - I just haven't done it yet. I'll attach a new patch. On Mon, 26 Apr 2004, Chris Wright wrote: > This looks like it's just the infrastructure, i.e. nothing is using it. > It seems like PAGG could be done on top of CKRM (albeit, with more > code). But if the goal is to do some basic accounting, scheduling, etc. > on a resource group, wouldn't CKRM be more generic? Right. A couple examples of things we have that use it are CSA (oss.sgi.com/csa) and job. job provides inescapable job containers that are also used by csa. But what I presented here was just the infrastructure as you said. Patches for inescapable job containers ('job') are available on the pagg web site as well (oss.sgi.com/pagg). > Couple quick comments below. > > > +struct pagg_hook { > > + struct module *module; When another kernel module makes use of PAGG, it sets this in the pagg hook. > > + char *name; /* Name Key - restricted to 32 characters */ > > why the restriction? I'm open to suggestions. Right now, this is usually set to something like "job" or similar. The max length is enforced by the module that makes use of pagg. For example, with the job package: ... #define PAGG_NAMELN 32 /* Max chars in PAGG module name */ ... #define PAGG_JOB "job" /* PAGG module identifier string */ ... > > +unregister_pagg_hook(struct pagg_hook *pagg_hook_old) > > > + down_write(&pagg_hook_list_sem); > > + > > + pagg_hook = get_pagg_hook(pagg_hook_old->name); > > + if (pagg_hook && pagg_hook == pagg_hook_old) { > > + /* > > + * Scan through processes on system and check for > > + * references to pagg containers for this pagg hook. > > + * > > + * The module cannot be unloaded if there are references. > > + */ > > + read_lock(&tasklist_lock); > > + for_each_process(task) { > > + struct pagg *pagg = NULL; > > + > > + read_lock_pagg_list(task); > > Uh-oh, grabbing a semaphore while holding tasklist_lock. > > There's too much hidden in macros (like read_lock_pagg_list). I fixed the tasklist issue you were concerned about. Again, I didn't address the macro issue at this moment. > > +attach_pagg_list(struct task_struct *to_task, struct task_struct *from_task) > > > + to_pagg = alloc_pagg(to_task, from_pagg->hook); > > + if (!to_pagg) { > > + retcode = -ENOMEM; > > + goto error_return; > > + } > > + retcode = attach_pagg(to_task, to_pagg, from_pagg->data); > > + if (retcode != 0) { > > + /* attach should issue error message */ > > + goto error_return; > > + } > > This looks like it leaks the just alloc'd to_pagg. I agree that it looks suspect but I think it's OK. You're talking about the case where the pagg was allocated, but couldn't attach I assume. The alloc_pagg function adds that allocated pagg to the pagg list. In error_return, detach_pagg_list is called so this pagg should be freed then. -- Erik Jacobson - Linux System Software - Silicon Graphics - Eagan, Minnesota ---2136806248-1763408987-1083099116=:632984 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.6.5-pagg.patch-3" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.6.5-pagg.patch-3" ZGlmZiAtTmFydSAyLjYtcGF0Y2gvRG9jdW1lbnRhdGlvbi9wYWdnLnR4dCAy LjZ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g ICBUaGUgbmFtZSBvZiB0aGUgcGFnZyBjb250YWluZXIgdHlwZSBwcm92aWRl ZCBieQ0KKyAqICAgICAgICAgICAgICAgICAgICAgdGhlIG1vZHVsZS4gVGhp cyB3aWxsIGJlIHNldCBieSB0aGUgcGFnZyBtb2R1bGUuDQorICogICAgIGF0 dGFjaDogICAgICAgICBGdW5jdGlvbiBwb2ludGVyIHRvIGZ1bmN0aW9uIHVz ZWQgd2hlbiBhdHRhY2hpbmcNCisgKiAgICAgICAgICAgICAgICAgICAgIGEg cHJvY2VzcyB0byB0aGUgcGFnZyBjb250YWluZXIgcmVmZXJlbmNlZCBieSAN CisgKiAgICAgICAgICAgICAgICAgICAgIHRoaXMgc3RydWN0Lg0KKyAqICAg ICBkZXRhY2g6ICAgICAgICAgRnVuY3Rpb24gcG9pbnRlciB0byBmdW5jdGlv biB1c2VkIHdoZW4gZGV0YWNoaW5nDQorICogICAgICAgICAgICAgICAgICAg ICBhIHByb2Nlc3MgdG8gdGhlIHBhZ2cgY29udGFpbmVyIHJlZmVyZW5jZWQg YnkgDQorICogICAgICAgICAgICAgICAgICAgICB0aGlzIHN0cnVjdC4NCisg KiAgICAgaW5pdDogICAgICAgICAgIEZ1bmN0aW9uIHBvaW50ZXIgdG8gaW5p dGlhbGl6YXRpb24gZnVuY3Rpb24uICBUaGlzDQorICogICAgICAgICAgICAg ICAgICAgICBmdW5jdGlvbiBpcyB1c2VkIHdoZW4gdGhlIG1vZHVsZSBpcyBs b2FkZWQgdG8gYXR0YWNoDQorICogICAgICAgICAgICAgICAgICAgICBleGlz dGluZyBwcm9jZXNzZXMgdG8gYSBkZWZhdWx0IGNvbnRhaW5lciBhcyBkZWZp bmVkIGJ5DQorICogICAgICAgICAgICAgICAgICAgICB0aGUgcGFnZyBtb2R1 bGUuIFRoaXMgaXMgb3B0aW9uYWwgYW5kIG1heSBiZSBzZXQgdG8gDQorICog ICAgICAgICAgICAgICAgICAgICBOVUxMIGlmIGl0IGlzIG5vdCBuZ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lRfU1lNQk9MKHVu cmVnaXN0ZXJfcGFnZ19ob29rKTsNCisNCisjZW5kaWYgLyogQ09ORklHX1BB R0cgKi8NCg== ---2136806248-1763408987-1083099116=:632984-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/