Hi all Currently in mainline we do block account if the flags parameter carries VM_NORESERVE. But blocks should be accounted if reserved, as shown by the following diff. Am I missing anything? thanks Hillf --- a/mm/shmem.c Fri Aug 5 14:01:59 2016 +++ b/mm/shmem.c Fri Aug 5 14:36:31 2016 @@ -168,7 +168,7 @@ static inline int shmem_reacct_size(unsi */ static inline int shmem_acct_block(unsigned long flags, long pages) { - if (!(flags & VM_NORESERVE)) + if (flags & VM_NORESERVE) return 0; return security_vm_enough_memory_mm(current->mm, @@ -177,7 +177,7 @@ static inline int shmem_acct_block(unsig static inline void shmem_unacct_blocks(unsigned long flags, long pages) { - if (flags & VM_NORESERVE) + if (!(flags & VM_NORESERVE)) vm_unacct_memory(pages * VM_ACCT(PAGE_SIZE)); } -- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>