Re: [RFC] mm: Account anon mappings as RLIMIT_DATA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 11, 2015 at 12:55:51PM -0800, Linus Torvalds wrote:
> >
> > +static inline int anon_accountable_mapping(struct file *file, vm_flags_t vm_flags)
> > +{
> > +       return !file &&
> > +               (vm_flags & (VM_GROWSDOWN | VM_GROWSUP |
> > +                            VM_SHARED | VM_MAYSHARE)) == 0;
> > +}
> 
> You're duplicating that "is it an anon accountable mapping" logic. I
> think you should move the inline helper function up, and use it in
> vm_stat_account().
> 
> Other than that, I think the patch certainly looks clean and obvious
> enough. But I didn't actually try to *run* it, maybe it ends up not
> working due to something I don't see.

Thank for the note, Linus! I tried to play with it a little bit,
but I need to test it more first. I sent it simply to be sure
that i'm moving in right direction. Once I get reviewed all things
again and test it more deeply, I'll send a new patch.

--
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>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]