[EMAIL PROTECTED] wrote:
> This patch set extends generic containers with support for fork/exit
> callbacks, and uses this to implement the ResGroups core and example
> resource controller. There's still some work to be done on
> synchronization rules, so it's a work-in-progress, but it demonstrates
> the approach that I have in mind.
>
> Each RG resource controller becomes an independent container subsystem;
> the RG core is essentially a library that the resource controllers can
> use to provide the RG API to userspace. Rather than a single shares
> and stats file in each group, there's a <controller>_shares and
> a <controller>_stats file, each linked to the appropriate resource
> controller.
>
> The example numtasks resource controller is almost unchanged; the
> primary differences involve locking, the details of which are still to
> be finalized.
>
Hi, Paul,
The attached patch is required to get my kernel to link. I've also removed
two warnings.
I've just started playing around with the patches, the overall approach is
very interesting.
--
Warm Regards,
Balbir Singh,
Linux Technology Center,
IBM Software Labs
Signed-off-by: Balbir Singh <[EMAIL PROTECTED]>
---
kernel/res_group/local.h | 2 +-
kernel/res_group/res_group.c | 6 ------
kernel/res_group/rgcs.c | 8 ++++----
3 files changed, 5 insertions(+), 11 deletions(-)
diff -puN kernel/res_group/res_group.c~container-res-group-fix-link-failure kernel/res_group/res_group.c
--- linux-2.6.18/kernel/res_group/res_group.c~container-res-group-fix-link-failure 2006-10-10 14:03:40.000000000 +0530
+++ linux-2.6.18-balbir/kernel/res_group/res_group.c 2006-10-10 14:04:58.000000000 +0530
@@ -158,10 +158,4 @@ int unregister_controller(struct res_con
EXPORT_SYMBOL_GPL(register_controller);
EXPORT_SYMBOL_GPL(unregister_controller);
-EXPORT_SYMBOL_GPL(get_controller_by_name);
-EXPORT_SYMBOL_GPL(get_controller_by_id);
-EXPORT_SYMBOL_GPL(put_controller);
-EXPORT_SYMBOL_GPL(alloc_res_group);
-EXPORT_SYMBOL_GPL(free_res_group);
-EXPORT_SYMBOL_GPL(default_res_group);
EXPORT_SYMBOL_GPL(set_controller_shares);
diff -puN kernel/res_group/local.h~container-res-group-fix-link-failure kernel/res_group/local.h
--- linux-2.6.18/kernel/res_group/local.h~container-res-group-fix-link-failure 2006-10-10 14:19:21.000000000 +0530
+++ linux-2.6.18-balbir/kernel/res_group/local.h 2006-10-10 14:19:35.000000000 +0530
@@ -26,7 +26,7 @@ ssize_t res_group_file_read(struct conta
struct file *file,
char __user *buf,
size_t nbytes, loff_t *ppos);
-ssize_t res_group_file_write(struct container *cont,
+int res_group_file_write(struct container *cont,
struct cftype *cft,
struct file *file,
const char __user *userbuf,
diff -puN kernel/res_group/rgcs.c~container-res-group-fix-link-failure kernel/res_group/rgcs.c
--- linux-2.6.18/kernel/res_group/rgcs.c~container-res-group-fix-link-failure 2006-10-10 14:19:24.000000000 +0530
+++ linux-2.6.18-balbir/kernel/res_group/rgcs.c 2006-10-10 14:20:50.000000000 +0530
@@ -217,7 +217,7 @@ static ssize_t show_shares(struct resour
return rc;
}
-ssize_t res_group_file_write(struct container *cont,
+int res_group_file_write(struct container *cont,
struct cftype *cft,
struct file *file,
const char __user *userbuf,
@@ -226,13 +226,13 @@ ssize_t res_group_file_write(struct cont
struct res_group_cft *rgcft = container_of(cft, struct res_group_cft, cft);
struct res_controller *ctlr = rgcft->ctlr;
- if (nbytes >= PAGE_SIZE)
- return -E2BIG;
-
char *buf;
ssize_t retval;
int filetype = cft->private;
+ if (nbytes >= PAGE_SIZE)
+ return -E2BIG;
+
buf = kmalloc(nbytes + 1, GFP_USER);
if (!buf) return -ENOMEM;
if (copy_from_user(buf, userbuf, nbytes)) {
_
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech