>>Add the following system calls for UB management: >> 1. sys_getluid - get current UB id >> 2. sys_setluid - changes exec_ and fork_ UBs on current >> 3. sys_setublimit - set limits for resources consumtions >> > > > Why not have another system call for getting the current limits? will add sys_getublimit().
> But as I said in previous mail, configfs seems like a better choice for > user interface. That way user has to go to one place to read/write > limits, see the current usage and other stats. Check another email about interfaces. I have arguments against it :/ >>Signed-Off-By: Pavel Emelianov <[EMAIL PROTECTED]> >>Signed-Off-By: Kirill Korotaev <[EMAIL PROTECTED]> > > > ...<snip>... > >>+ >>+/* >>+ * The setbeanlimit syscall >>+ */ >>+asmlinkage long sys_setublimit(uid_t uid, unsigned long resource, >>+ unsigned long *limits) >>+{ > > >>+ ub = beancounter_findcreate(uid, NULL, 0); >>+ if (ub == NULL) >>+ goto out; >>+ >>+ spin_lock_irqsave(&ub->ub_lock, flags); >>+ ub->ub_parms[resource].barrier = new_limits[0]; >>+ ub->ub_parms[resource].limit = new_limits[1]; >>+ spin_unlock_irqrestore(&ub->ub_lock, flags); >>+ > > > I think there should be a check here for seeing if the new limits are > lower than the current usage of a resource. If so then take appropriate > action. any idea what exact action to add here? Looks like can be added when needed, agree? Thanks, Kirill ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ ckrm-tech mailing list https://lists.sourceforge.net/lists/listinfo/ckrm-tech