Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1280041

Re: [PATCH 13/13] mm: memcontrol: hook up vmpressure to socket pressure

From Vladimir Davydov <vdavydov@virtuozzo.com>
Newsgroups linux.kernel
Subject Re: [PATCH 13/13] mm: memcontrol: hook up vmpressure to socket pressure
Date 2015-11-30 17:20 +0100
Message-ID <qAzlf-5Uw-1@gated-at.bofh.it> (permalink)
References <qytMZ-5hB-3@gated-at.bofh.it> <qytWH-5Av-29@gated-at.bofh.it> <qAuYi-2X2-31@gated-at.bofh.it> <qAz1U-5xV-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Nov 30, 2015 at 10:58:38AM -0500, Johannes Weiner wrote:
> On Mon, Nov 30, 2015 at 02:36:28PM +0300, Vladimir Davydov wrote:
> > Suppose we have the following cgroup configuration.
> > 
> > A __ B
> >   \_ C
> > 
> > A is empty (which is natural for the unified hierarchy AFAIU). B has
> > some workload running in it, and C generates socket pressure. Due to the
> > socket pressure coming from C we start reclaim in A, which results in
> > thrashing of B, but we might not put sockets under pressure in A or C,
> > because vmpressure does not account pages scanned/reclaimed in B when
> > generating a vmpressure event for A or C. This might result in
> > aggressive reclaim and thrashing in B w/o generating a signal for C to
> > stop growing socket buffers.
> > 
> > Do you think such a situation is possible? If so, would it make sense to
> > switch to post-order walk in shrink_zone and pass sub-tree
> > scanned/reclaimed stats to vmpressure for each scanned memcg?
> 
> In that case the LRU pages in C would experience pressure as well,
> which would then reign in the sockets in C. There must be some LRU
> pages in there, otherwise who is creating socket pressure?
> 
> The same applies to shrinkers. All secondary reclaim is driven by LRU
> reclaim results.
> 
> I can see that there is some unfairness in distributing memcg reclaim
> pressure purely based on LRU size, because there are scenarios where
> the auxiliary objects (incl. sockets, but mostly shrinker pools)
> amount to a significant portion of the group's memory footprint. But
> substitute group for NUMA node and we've had this behavior for
> years. I'm not sure it's actually a problem in practice.
> 

Fiar enough. Let's wait until we hit this problem in real world then.

The patch looks good to me.

Reviewed-by: Vladimir Davydov <vdavydov@virtuozzo.com>

Thanks,
Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] mm: memcontrol: account socket memory in unified hierarchy v4 Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
  [PATCH 12/13] mm: memcontrol: account socket memory in unified  hierarchy memory controller Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
    Re: [PATCH 12/13] mm: memcontrol: account socket memory in unified  hierarchy memory controller David Miller <davem@davemloft.net> - 2015-11-25 17:40 +0100
    Re: [PATCH 12/13] mm: memcontrol: account socket memory in unified  hierarchy memory controller Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-30 12:00 +0100
      Re: [PATCH 12/13] mm: memcontrol: account socket memory in unified  hierarchy memory controller Johannes Weiner <hannes@cmpxchg.org> - 2015-11-30 16:30 +0100
        Re: [PATCH 12/13] mm: memcontrol: account socket memory in unified  hierarchy memory controller Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-30 18:10 +0100
  [PATCH 01/13] mm: memcontrol: export root_mem_cgroup Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
  [PATCH 04/13] net: tcp_memcontrol: protect all tcp_memcontrol calls by jump-label Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
  [PATCH 02/13] net: tcp_memcontrol: properly detect ancestor socket pressure Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
  [PATCH 06/13] net: tcp_memcontrol: simplify the per-memcg limit access Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
    Re: [PATCH 06/13] net: tcp_memcontrol: simplify the per-memcg  limit access David Miller <davem@davemloft.net> - 2015-11-25 17:30 +0100
  [PATCH 07/13] net: tcp_memcontrol: sanitize tcp memory accounting callbacks Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
    Re: [PATCH 07/13] net: tcp_memcontrol: sanitize tcp memory  accounting callbacks David Miller <davem@davemloft.net> - 2015-11-25 17:30 +0100
  [PATCH 03/13] net: tcp_memcontrol: remove bogus hierarchy pressure propagation Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
  [PATCH 11/13] mm: memcontrol: move socket code for unified hierarchy accounting Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
    Re: [PATCH 11/13] mm: memcontrol: move socket code for unified  hierarchy accounting David Miller <davem@davemloft.net> - 2015-11-25 17:40 +0100
  [PATCH 09/13] mm: memcontrol: generalize the socket accounting jump label Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
    Re: [PATCH 09/13] mm: memcontrol: generalize the socket accounting  jump label David Miller <davem@davemloft.net> - 2015-11-25 17:30 +0100
    Re: [PATCH 09/13] mm: memcontrol: generalize the socket accounting  jump label Jason Baron <jbaron@akamai.com> - 2015-11-30 22:10 +0100
      Re: [PATCH 09/13] mm: memcontrol: generalize the socket accounting  jump label Johannes Weiner <hannes@cmpxchg.org> - 2015-11-30 23:00 +0100
        Re: [PATCH 09/13] mm: memcontrol: generalize the socket accounting  jump label Jason Baron <jbaron@akamai.com> - 2015-11-30 23:30 +0100
          Re: [PATCH 09/13] mm: memcontrol: generalize the socket accounting  jump label Johannes Weiner <hannes@cmpxchg.org> - 2015-11-30 23:50 +0100
  [PATCH 08/13] net: tcp_memcontrol: simplify linkage between socket and page counter Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
    Re: [PATCH 08/13] net: tcp_memcontrol: simplify linkage between  socket and page counter David Miller <davem@davemloft.net> - 2015-11-25 17:30 +0100
  [PATCH 05/13] net: tcp_memcontrol: remove dead per-memcg count of allocated sockets Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:00 +0100
  [PATCH 13/13] mm: memcontrol: hook up vmpressure to socket pressure Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 23:10 +0100
    Re: [PATCH 13/13] mm: memcontrol: hook up vmpressure to socket  pressure David Miller <davem@davemloft.net> - 2015-11-25 17:40 +0100
    Re: [PATCH 13/13] mm: memcontrol: hook up vmpressure to socket  pressure Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-30 12:40 +0100
      Re: [PATCH 13/13] mm: memcontrol: hook up vmpressure to socket  pressure Johannes Weiner <hannes@cmpxchg.org> - 2015-11-30 17:00 +0100
        Re: [PATCH 13/13] mm: memcontrol: hook up vmpressure to socket  pressure Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-30 17:20 +0100

csiph-web