Received: by 10.192.165.148 with SMTP id m20csp304077imm; Thu, 26 Apr 2018 22:11:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZokiNM+/JlEwkWhqIAekMStsxwIwZrZu09H4PdhPgAYT32j+4Fa06wXU/LaA1voex3W22V4 X-Received: by 2002:a63:6d8b:: with SMTP id i133-v6mr870549pgc.268.1524805917501; Thu, 26 Apr 2018 22:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524805917; cv=none; d=google.com; s=arc-20160816; b=0K7XuRLP8gfRCKYcZ2wtbnArBWIFag2AQM2qMTREPHc17PdCNse75oj+Ty1Fed1TQ3 6JvMFOHF5TbAaAdDd43xdz9/gs4DN3S1guosyi02dNphHs0fBhpTCh8jL4qonwacA/CI zzM9sJIW1WVm49oWh17P8m1+lX3Ve4p20rVrHsPWHeHUIO4MlB3HrPcrTbMAlah9jOdv Zu8+9pKt9VnXqf6OfnWg2NsgHSL12ExwswUj9YDI3fzbXqlJFZ63XqQCneOKMDJ+cmCc s2Gz2FnWJWjnDcrRTseHMGv1MlIZctdJn4DJuTImaQDOTtrzsSyY5Ze8ZYQf2Shf/Ca7 HbZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=LtaV2dOFWDCUQr+XRpytx45RSM54Jh101R2IcF5/aRA=; b=D4i8Hc/Gnbi1uJErbF8T72VlvQJ8dRKLcE7bo7K1Ix7/GLYEyanlvpJ0pZ3OwiEPAt VEUYiZl77NwzpWDFoPM/2R0hHYKcnTARLcX73fpu2l25WNq8x2sWyml2PbyNakkGw9dT j7MeOG3Xzc4bhzJRn590qM+k+ukIqSQWui+BE8DcjbC/A0Y4qTS0TS+xJaxU6xHZWe6R r3smUWojFfgKNNOnwtBB3E+SWpNt+7IJgjbdsOlBhSQAqAuCx8fnjfKW6cTFoZQhc9G0 CdNIr0Y62BOMOxD64TO/TeaEy0J0mpqLPbreybp+goMiLd1B8wYRtEtSkcCCo3ioCqTD 2BMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=i/4E/bLU; dkim=pass header.i=@codeaurora.org header.s=default header.b=i/4E/bLU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8-v6si493603pgo.689.2018.04.26.22.11.43; Thu, 26 Apr 2018 22:11:57 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=i/4E/bLU; dkim=pass header.i=@codeaurora.org header.s=default header.b=i/4E/bLU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751792AbeD0FKj (ORCPT + 99 others); Fri, 27 Apr 2018 01:10:39 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42098 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbeD0FKi (ORCPT ); Fri, 27 Apr 2018 01:10:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C119460F6E; Fri, 27 Apr 2018 05:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524805837; bh=SDbSzNv+tNtQTa6JhaFQrhwX5w22ZHk3/ZmESFj+liI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i/4E/bLUOqEFNMvp7d/2mDhcCQe6CQpsMdWH++w3LCL/fDpvH8PV0PeXOjk5nggdg e1qK+4+zSRwWlmGUi2FPvzkgqcP/+JDH1+kUcK/76ztdJk/UMGg1fyzIVIKTCeayDO eqjKJPccwPGGap739l7RJ7ISqTU0mcHv4SOQTu2M= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id E7BF86071A; Fri, 27 Apr 2018 05:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524805837; bh=SDbSzNv+tNtQTa6JhaFQrhwX5w22ZHk3/ZmESFj+liI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i/4E/bLUOqEFNMvp7d/2mDhcCQe6CQpsMdWH++w3LCL/fDpvH8PV0PeXOjk5nggdg e1qK+4+zSRwWlmGUi2FPvzkgqcP/+JDH1+kUcK/76ztdJk/UMGg1fyzIVIKTCeayDO eqjKJPccwPGGap739l7RJ7ISqTU0mcHv4SOQTu2M= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 27 Apr 2018 10:40:36 +0530 From: vjitta@codeaurora.org To: Laura Abbott Cc: sumit.semwal@linaro.org, gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com, maco@android.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linux-kernel-owner@vger.kernel.org Subject: Re: [PATCH] ion: Consider ion pool pages as indirectly reclaimable In-Reply-To: <8618859b-06f9-39a7-80a9-af36cf9faf9f@redhat.com> References: <1524627830-17187-1-git-send-email-vjitta@codeaurora.org> <8618859b-06f9-39a7-80a9-af36cf9faf9f@redhat.com> Message-ID: X-Sender: vjitta@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-25 21:17, Laura Abbott wrote: > 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 You can refer to discussion here https://lkml.org/lkml/2018/3/5/361 introducing NR_INDIRECTLY_RECLAIMABLE_BYTES for the memory which is not currently considered as reclaimable Thanks, Vijay