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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 18 Mar 2008 08:35:52 +0900 (JST)
From:	yamamoto@...inux.co.jp (YAMAMOTO Takashi)
To:	balbir@...ux.vnet.ibm.com
Cc:	linux-mm@...ck.org, hugh@...itas.com, skumar@...ux.vnet.ibm.com,
	menage@...gle.com, lizf@...fujitsu.com,
	linux-kernel@...r.kernel.org, taka@...inux.co.jp,
	rientjes@...gle.com, xemul@...nvz.org, akpm@...ux-foundation.org,
	kamezawa.hiroyu@...fujitsu.com
Subject: Re: [RFC][2/3] Account and control virtual address space allocations

> diff -puN mm/swapfile.c~memory-controller-virtual-address-space-accounting-and-control mm/swapfile.c
> diff -puN mm/memory.c~memory-controller-virtual-address-space-accounting-and-control mm/memory.c
> --- linux-2.6.25-rc5/mm/memory.c~memory-controller-virtual-address-space-accounting-and-control	2008-03-16 22:57:40.000000000 +0530
> +++ linux-2.6.25-rc5-balbir/mm/memory.c	2008-03-16 22:57:40.000000000 +0530
> @@ -838,6 +838,11 @@ unsigned long unmap_vmas(struct mmu_gath
>  
>  		if (vma->vm_flags & VM_ACCOUNT)
>  			*nr_accounted += (end - start) >> PAGE_SHIFT;
> +		/*
> +		 * Unaccount used virtual memory for cgroups
> +		 */
> +		mem_cgroup_update_as(vma->vm_mm,
> +					((long)(start - end)) >> PAGE_SHIFT);
>  
>  		while (start != end) {
>  			if (!tlb_start_valid) {

i think you can sum and uncharge it with a single call.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ