[PATCH] powerpc/mm: Fix RECLAIM_DISTANCE

Gavin Shan gwshan at linux.vnet.ibm.com
Tue Jan 31 16:30:06 AEDT 2017


On Tue, Jan 31, 2017 at 03:58:16PM +1100, Anton Blanchard wrote:
>Hi,
>
>
>> Anton, I think the behaviour looks good. Actually, it's not very
>> relevant to the issue addressed by the patch. I will reply to
>> Michael's reply about the reason. There are two nodes in your system
>> and the memory is expected to be allocated from node-0. If node-0
>> doesn't have enough free memory, the allocater switches to node-1. It
>> means we need more stress.
>
>Did you try setting zone_reclaim_mode? Surely we should reclaim local
>clean pagecache if enabled?
>

In last experiment, I didn't enable zone_reclaim_mode. After changed it to 0x2
(RECLAIM_WRITE), the local pagecache isn't reclaimed from node-0 as we observed
before.

root at P83-p1:~# cat /proc/sys/vm/zone_reclaim_mode
2
root at P83-p1:~# sync
root at P83-p1:~# echo 3 > /proc/sys/vm/drop_caches
root at P83-p1:~# taskset -c 0 cat /tmp/file.8G > /dev/null
root at P83-p1:~# grep FilePages /sys/devices/system/node/node0/meminfo 
Node 0 FilePages:       8497920 kB
root at P83-p1:~# taskset -c 0 ./alloc 68719476736
root at P83-p1:~# grep FilePages /sys/devices/system/node/node0/meminfo 
Node 0 FilePages:       8497920 kB

With the patch applied, the local pagecache is reclaimed:

root at P83-p1:~# cat /proc/sys/vm/zone_reclaim_mode
2
root at P83-p1:~# sync
root at P83-p1:~# echo 3 > /proc/sys/vm/drop_caches
root at P83-p1:~# taskset -c 0 cat /tmp/file.8G > /dev/null
root at P83-p1:~# grep FilePages /sys/devices/system/node/node0/meminfo
Node 0 FilePages:       8441472 kB
root at P83-p1:~# taskset -c 0 ./alloc 68719476736
root at P83-p1:~# grep FilePages /sys/devices/system/node/node0/meminfo
Node 0 FilePages:        712960 kB

Thanks,
Gavin



More information about the Linuxppc-dev mailing list