Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp307475ybr; Fri, 22 May 2020 07:10:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwINRP1+WRvNIImqHh0mggZQ1RLMgfheZau9cTRf0gbX8lVSF+RXhJnaZVnCWfrjZ6uWkgc X-Received: by 2002:a17:906:6d44:: with SMTP id a4mr8679548ejt.541.1590156641204; Fri, 22 May 2020 07:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590156641; cv=none; d=google.com; s=arc-20160816; b=P3VRpbiV3A2EXM6k/YilhWfOSVWO5ogXtPAjXEa8H8JFD9SpQxsfE/wDPxMdHNXwhE elwUwOPXcIyAUkLnDcCm489LwoCne39nI+cC5ANoZcso21UCxFipaEIQcaY3lBcjtu3x uKR8pZ7DpaI7EA/z3ukfvoGOjea8Efyxp7tyswXRu9P1iyT07U6zCDFO0bq4kJ9VOaga XAmkwbnOV2K/92XgqIVqcvfoafgyEXoJzimxmnEYAnlzzxvEul+oWwf9hdtElj/T2WDF 0ZvskNzT8EeZB6y+OVOVCntGQFj9YOTb5H3Qx95WNJEa+dDynFx6+dSuHExXwIlTHfSU 7iiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ASpIJRV1LgbYaIn/8sihf9PSqZ7K//HA8oIfV5Jji1U=; b=CPGfVzFvXbCmtc4ciXmoggA9eYQW3oNzxyyhDQvwmvAolvaVBh/2k5jcHYDdGQaUjv U16YPJUewjF4ZFh3CpzoPxTJ1AxYr8JLLdNnjY3iEtpkazYIki2rvkMG2Ip87n4QZ17+ KM3ZbKqjl99kdRLDgiVeKgLC9Hu8xvZZcnq+z2S7peDQeNXGql+5I3ED49Xx3M48Y6hp 9yt3IIjFKBBl1AzshhmxBn0QuJQWsCf1zjGjBDyQRWZrcsltDiwGep8NOCBEXUPt3+yt bbnFs+L9rHJcZC4sZbNa2cDZYjPQe18VixLEhjnWLtAAQaKCEkBQ/NicqRjb7JWJJkPS dhRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Q98veh9b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si4545752edm.203.2020.05.22.07.10.12; Fri, 22 May 2020 07:10:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Q98veh9b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729929AbgEVOIK (ORCPT + 99 others); Fri, 22 May 2020 10:08:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729399AbgEVOIJ (ORCPT ); Fri, 22 May 2020 10:08:09 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8351DC05BD43 for ; Fri, 22 May 2020 07:08:09 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id x22so6596525lfd.4 for ; Fri, 22 May 2020 07:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ASpIJRV1LgbYaIn/8sihf9PSqZ7K//HA8oIfV5Jji1U=; b=Q98veh9b1zBp4PWhmCf74WRK0Byrzkwey2rtOIQaXyx1kyEDcG3M6jXlCJOhaNxM5/ 9sj2TOOYHXEwh0fYzQ9FWMZfc0E8eE1/WZ2qrZajc+2KYj6iyYljfm/4TvkU3jkfOFI3 YYUty1xtwI/bERs9jSMcLkRivOd74V0q8VEyy+weMSJJux6/WgAlmVEJMy5S77lYpI6X C4RRVTYaZZ3O6DoGtybBgW13esxeDx7YL6yHgkoJ4xGvMUndKjLCAM0tNGLW0pfCIKJU 1RIk/vV7uokJ+qdYAfnkLwrgbKEC2CRiXSL18tpjvsHmOZiGRKjVtgqW4lxZcNme/MRF 2niQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ASpIJRV1LgbYaIn/8sihf9PSqZ7K//HA8oIfV5Jji1U=; b=YGpBA7fbXCGyXZRWeQUi8mL0DxEmo45fyNapsVUintq9f4TKICAgiE9yZqYoForOS3 Y3tgoiZ1Eu/hXX/nfO+bBRF42SF4TqBF3ezF4Thr2t8Dbnmlf+bAamdVw+EMYJkZd2bs GkNjYAq/58obiNzsrptXMOodQRdg8tpUS5LC+LA2xLA9XzZv0b7zQJRhNr7hHONjmZz1 Yz3EpSColCtKlvAwy+anFwky+jS7sJsqdXw3K8n0xPjhwj59o9Tybv2cLTbKZ4848IRr 3EpDcr9MzSG7rSJSCQnZn7T/N7E09Q/TnQMQEOLS+x1+am7WVHvMsnq3bfHmlQulzjht ffzA== X-Gm-Message-State: AOAM532NCnFGeC1nYkH7ZdDbEhZIGxzIgWt8/ZcEjyQUfU5AYrhlkqUD LWUiCHE5rKmJhvkyjqHUQ/RX/g9yUl7T4cioyZ2PaA== X-Received: by 2002:a19:490d:: with SMTP id w13mr7491640lfa.96.1590156487605; Fri, 22 May 2020 07:08:07 -0700 (PDT) MIME-Version: 1.0 References: <20200520163142.GA808793@chrisdown.name> In-Reply-To: <20200520163142.GA808793@chrisdown.name> From: Shakeel Butt Date: Fri, 22 May 2020 07:07:56 -0700 Message-ID: Subject: Re: [PATCH] mm, memcg: unify reclaim retry limits with page allocator To: Chris Down Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Linux MM , Cgroups , LKML , Kernel Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2020 at 9:32 AM Chris Down wrote: > > Reclaim retries have been set to 5 since the beginning of time in > 66e1707bc346 ("Memory controller: add per cgroup LRU and reclaim"). > However, we now have a generally agreed-upon standard for page reclaim: > MAX_RECLAIM_RETRIES (currently 16), added many years later in > 0a0337e0d1d1 ("mm, oom: rework oom detection"). > > In the absence of a compelling reason to declare an OOM earlier in memcg > context than page allocator context, it seems reasonable to supplant > MEM_CGROUP_RECLAIM_RETRIES with MAX_RECLAIM_RETRIES, making the page > allocator and memcg internals more similar in semantics when reclaim > fails to produce results, avoiding premature OOMs or throttling. > > Signed-off-by: Chris Down Reviewed-by: Shakeel Butt