Received: by 10.192.165.148 with SMTP id m20csp863563imm; Wed, 25 Apr 2018 08:49:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx49UUQ9DBTT0Z6XIJTJb3ZACcwRJEFddFbiXDcICUz3/ADMZfUTQbU2JyzWpPbc5CEMY7vdf X-Received: by 10.98.149.21 with SMTP id p21mr19960769pfd.62.1524671354225; Wed, 25 Apr 2018 08:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524671354; cv=none; d=google.com; s=arc-20160816; b=Woras8b+Y6EEhwWXCTzuXPk3vdJlj14Fgo4WFMb2AehaA58duPRpMvIKSSYf303UvJ T5EN/jAZc0KamD4qxyVIby8oXtmB28T6HxBrxwbRD0Aj61cIxZAq9z7xeuSzMxYtv6oE X46DXBDS4WpPWvVkdrIyOv3KYJ3CuGL2ame+WoJ05GQqCy/H9jQxS44OR43x8FW04FBt S5E90CLn27FWFXFKl66HGsNmXZoVrt53lmBYYiQikmVzu5O5qkPHicvRH26WDpaq9Kz/ eMlGbJ77LL7X46zKfsFEa9hjxYyN2nanPivYNZxdWUH2v/BetnuI8bSHWTrnqH9FxmzB B1Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=zxDLaRXGm8d7OuSwf5W7Lg2cXcWHFMrVBc617UmcgzY=; b=fzVDQpXWs/bdBykU4efEu2s5MsMyUOFN/JqwitcUIcVZ6xiPHyZdW5jfk8f4C1luJo rEj+yMJJpZXuLBwFt0rcf11Qwen/tZbkV1/93HHTdey2McGkuxyi14fiVttDfItkHWye 4sipa8owiFUc2gLAU4tVcKQJ1gQ+0K0aNRmtqMGzxsUXN14FvV3RgbG5pLK2Rm6J7DPr pqJnFymEVPV90YFy6PGlZ8gXb+Z1MeiLu4azFsgW5QPKTbaLheQbKnOBL/VW/Rxcx5DU EiyWzIKalByEzu3ZpatipeN0xUfnAWCwC6cC6bRw4oK7Qp31J5Xp5EFoZdJhqVf4i6Yh eEDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q124si13957448pgq.215.2018.04.25.08.48.59; Wed, 25 Apr 2018 08:49:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755090AbeDYPro (ORCPT + 99 others); Wed, 25 Apr 2018 11:47:44 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36320 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755037AbeDYPri (ORCPT ); Wed, 25 Apr 2018 11:47:38 -0400 Received: by mail-pg0-f65.google.com with SMTP id i6so13625560pgv.3 for ; Wed, 25 Apr 2018 08:47:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zxDLaRXGm8d7OuSwf5W7Lg2cXcWHFMrVBc617UmcgzY=; b=DCwrPgYJYtIasYYwg86+M6YLoBu5uutqZCNK1I4pTnHn7260EZDN0vlKD/Zhxe3qo7 pKQCHPsj7oTI8QkYBD81ENYgSmu/OD7qhGL9+kQ6gPVYGv4uyPuOpnIXnhbCS9MOLr6p xTk5UgOseYgXDoD5o/AvWUigqyNORJ86fmPjl5GZ4q2CpvTR52+8F3WiiMYZbprvKTyZ Yh/6HygHjJqICyc6+KhTw/+2CRWAUdVKSr/puGCo3TTkikFDpzDQkdonWxqMP18BaYAC ol5rd4dkx/SQQlL96mhFG/obirX1v8X3sG4P49e7ZpCO3UfOdfNHYJ558l3MSvQ5PD2K 3Qzw== X-Gm-Message-State: ALQs6tBTsJgITNPrS86TY1jzj1jZmz7YaZspOZ5H9eaKfFj00Xjbvxg4 ZZguhFtvjITwN5K9ML1pFOs/gmvh/K4= X-Received: by 10.99.151.65 with SMTP id d1mr24672388pgo.447.1524671257299; Wed, 25 Apr 2018 08:47:37 -0700 (PDT) Received: from localhost.localdomain ([198.233.165.212]) by smtp.gmail.com with ESMTPSA id x84sm54011294pfi.160.2018.04.25.08.47.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 08:47:36 -0700 (PDT) Subject: Re: [PATCH] ion: Consider ion pool pages as indirectly reclaimable To: vjitta@codeaurora.org, sumit.semwal@linaro.org Cc: gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com, maco@android.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <1524627830-17187-1-git-send-email-vjitta@codeaurora.org> From: Laura Abbott Message-ID: <8618859b-06f9-39a7-80a9-af36cf9faf9f@redhat.com> Date: Wed, 25 Apr 2018 08:47:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1524627830-17187-1-git-send-email-vjitta@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/24/2018 08:43 PM, vjitta@codeaurora.org wrote: > From: Vijayanand Jitta > > An issue is observed where mallocs are failing due to overcommit failure. > The failure happens when there is high ION page pool since ION page > pool is not considered reclaimable by the overcommit calculation code. > This change considers ion pool pages as indirectly reclaimable and thus > accounted as available memory in the overcommit calculation. > > Signed-off-by: Vijayanand Jitta > --- > drivers/staging/android/ion/ion_page_pool.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c > index db8f614..9bc56eb 100644 > --- a/drivers/staging/android/ion/ion_page_pool.c > +++ b/drivers/staging/android/ion/ion_page_pool.c > @@ -32,6 +32,9 @@ static void ion_page_pool_add(struct ion_page_pool *pool, struct page *page) > list_add_tail(&page->lru, &pool->low_items); > pool->low_count++; > } > + > + mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, > + (1 << (PAGE_SHIFT + pool->order))); > mutex_unlock(&pool->mutex); > } > > @@ -50,6 +53,8 @@ static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high) > } > > list_del(&page->lru); > + mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, > + -(1 << (PAGE_SHIFT + pool->order))); > return page; > } > > I'm sure this fixes the problem but I don't think we want to start throwing page adjustments into Ion. Why isn't this memory already considered reclaimable by existing calculations? Thanks, Laura