lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 2 Jun 2008 11:15:40 +0900 (JST) From: yamamoto@...inux.co.jp (YAMAMOTO Takashi) To: kamezawa.hiroyu@...fujitsu.com Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, balbir@...ux.vnet.ibm.com, xemul@...nvz.org, menage@...gle.com, lizf@...fujitsu.com Subject: Re: [RFC][PATCH 1/2] memcg: res_counter hierarchy > @@ -135,13 +138,118 @@ ssize_t res_counter_write(struct res_cou > if (*end != '\0') > goto out_free; > } > - spin_lock_irqsave(&counter->lock, flags); > - val = res_counter_member(counter, member); > - *val = tmp; > - spin_unlock_irqrestore(&counter->lock, flags); > - ret = nbytes; > + if (member != RES_LIMIT || !callback) { is there any reason to check member != RES_LIMIT here, rather than in callers? > +/* > + * Move resource to its parent. > + * child->limit -= val. > + * parent->usage -= val. > + * parent->limit -= val. s/limit/for_children/ > + */ > + > +int res_counter_repay_resource(struct res_counter *child, > + struct res_counter *parent, > + unsigned long long val, > + res_shrink_callback_t callback, int retry) can you reduce gratuitous differences between res_counter_borrow_resource and res_counter_repay_resource? eg. 'success' vs 'done', how to decrement 'retry'. YAMAMOTO Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists