Re: [PATCH v4 1/4] mm: memcontrol: use helpers to access page's memcg data

2020-10-02 Thread Johannes Weiner
On Thu, Oct 01, 2020 at 01:51:43PM -0700, Roman Gushchin wrote: > On Thu, Oct 01, 2020 at 02:59:50PM -0400, Johannes Weiner wrote: > > On Thu, Oct 01, 2020 at 11:27:39AM -0700, Roman Gushchin wrote: > > > On Thu, Oct 01, 2020 at 09:46:38AM -0400, Johannes Weiner wrote: > > > > On Wed, Sep 30, 2020

Re: [PATCH v4 1/4] mm: memcontrol: use helpers to access page's memcg data

2020-10-01 Thread Roman Gushchin
On Thu, Oct 01, 2020 at 02:59:50PM -0400, Johannes Weiner wrote: > On Thu, Oct 01, 2020 at 11:27:39AM -0700, Roman Gushchin wrote: > > On Thu, Oct 01, 2020 at 09:46:38AM -0400, Johannes Weiner wrote: > > > On Wed, Sep 30, 2020 at 05:27:07PM -0700, Roman Gushchin wrote: > > > > +/* > > > > + *

Re: [PATCH v4 1/4] mm: memcontrol: use helpers to access page's memcg data

2020-10-01 Thread Johannes Weiner
On Thu, Oct 01, 2020 at 11:27:39AM -0700, Roman Gushchin wrote: > On Thu, Oct 01, 2020 at 09:46:38AM -0400, Johannes Weiner wrote: > > On Wed, Sep 30, 2020 at 05:27:07PM -0700, Roman Gushchin wrote: > > > +/* > > > + * set_page_memcg - associate a page with a memory cgroup > > > + * @page: a

Re: [PATCH v4 1/4] mm: memcontrol: use helpers to access page's memcg data

2020-10-01 Thread Roman Gushchin
On Thu, Oct 01, 2020 at 09:46:38AM -0400, Johannes Weiner wrote: > On Wed, Sep 30, 2020 at 05:27:07PM -0700, Roman Gushchin wrote: > > +/* > > + * set_page_memcg - associate a page with a memory cgroup > > + * @page: a pointer to the page struct > > + * @memcg: a pointer to the memory cgroup > > +

Re: [PATCH v4 1/4] mm: memcontrol: use helpers to access page's memcg data

2020-10-01 Thread Johannes Weiner
On Wed, Sep 30, 2020 at 05:27:07PM -0700, Roman Gushchin wrote: > +/* > + * set_page_memcg - associate a page with a memory cgroup > + * @page: a pointer to the page struct > + * @memcg: a pointer to the memory cgroup > + * > + * Associates a page with a memory cgroup. > + */ > +static inline void

[PATCH v4 1/4] mm: memcontrol: use helpers to access page's memcg data

2020-09-30 Thread Roman Gushchin
Currently there are many open-coded reads and writes of the page->mem_cgroup pointer, as well as a couple of read helpers, which are barely used. It creates an obstacle on a way to reuse some bits of the pointer for storing additional bits of information. In fact, we already do this for slab