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]
Message-ID: <20090304100420.GA16859@localhost>
Date:	Wed, 4 Mar 2009 18:04:20 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Markus <M4rkusXXL@....de>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: drop_caches ...

Hi Markus,

On Wed, Mar 04, 2009 at 10:57:33AM +0100, Markus wrote:
> Hello!
> 
> I have a small problem. Maybe its just a misunderstanding but I cant 
> solve it.
> 
> I think that writing "3" to drop_caches should drop all buffers and 
> caches which are already written. So its recommended to put a "sync" 
> infront of it.
> So I did "free -m ; sync ; echo 3 > /proc/sys/vm/drop_caches ; free -m"
> And it gave me:
>              total       used       free     shared    buffers     
> cached
> Mem:          3950       3922         28          0          1        
> 879
> -/+ buffers/cache:       3041        909
> Swap:         5342        205       5136
>              total       used       free     shared    buffers     
> cached
> Mem:          3950       3907         43          0          0        
> 864
> -/+ buffers/cache:       3041        908
> Swap:         5341        206       5135
> 
> So the buffer was 1 and is 0 afterthat. But cached is at 879 MB before 
> and is still 864 MB (!!!) after that!
> 
> I am at swappiness=0 and when I remove and readd one swap-partition 
> after another (so there is always swap). It will keep the cached and 
> put the swapped memory on other swaps?!
> 
> I _think_ thats not the way it should go?
> 
> It would be really kind if someone could explain that issue and 
> what "cached" is at all!

The memory mapped pages won't be dropped in this way.
"cat /proc/meminfo" will show you the number of mapped pages.

Thanks,
Fengguang
--
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