Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp59829pxa; Fri, 21 Aug 2020 00:46:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOWfuChQ3dTftUXtxvArpc+ij3gkNQRzncXHiM1do+n8JulmKZKAqMd5F44j1flzUYxDIZ X-Received: by 2002:a17:906:cd02:: with SMTP id oz2mr1733540ejb.326.1597996013182; Fri, 21 Aug 2020 00:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597996013; cv=none; d=google.com; s=arc-20160816; b=CGCInBJ/PdNNUXEHrv3qwWhU1qhMRrYRnRjU+9tH/IlILPZkLdH1Uo0HyGxyIL7/b9 oOBR4xP06gLEglxcRXh7L3LE7Ou+kaeSosXlwbDPjEz8K3vm0hewOTfwr2nROI0eP8AN xcPxh71P/Xks5cTB0qf0llyknjvPjgISQYIKAR4t4m3LdnRvAPSPSu5ZjiXVMPJ6fLIn dU8r+iI+z9RGmLmFdTyqIR6skegXbwOM7b058ta7GjH67mabSNSPXWg8Aj7scQKFfgMq KmXbLwOguBuQJki/LOm/tg25iWDdwVRAbSouboCdbOadMc1402BBSUHmwEwmaRii9ULn cAoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=2+53xcHFCjgELMf4X3YPM+muDniBJtUmbh8iQTB7pl0=; b=zUSRCmbFWR9XDuWhhnK/01vRJg822p4I9bww9CKBlF6ciJvwTaC3ud+smebMgkKPwO X0Upah7FXxEiGlT8mx6NxQWgsKzWMCCyIerzYEZc5t4RnM16X9uwVdma2nahuNHYQ6Gb wEHaHUYn4ZPe4EC0K9fPUVL35srAOki0KkjMS/CneL57t4EMNhaXh6aV06qNjfgfGuEu aI8klKHyJcPmBbfxGt5GpHOVokjOYPmYegiqDk93glbLQu9XEYYjFS+B5zG6LQWIDvAo FdPgZY30Xp3+8HwDN+NgPqjwM6Yvubxq/+ihI+GZ69Cpv2mO31KhfcrDE1gA7pxeySyB S94Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=jrAahD8w; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n17si693326edt.242.2020.08.21.00.46.29; Fri, 21 Aug 2020 00:46:53 -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=@samsung.com header.s=mail20170921 header.b=jrAahD8w; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbgHUHpz (ORCPT + 99 others); Fri, 21 Aug 2020 03:45:55 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:50409 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727824AbgHUHpx (ORCPT ); Fri, 21 Aug 2020 03:45:53 -0400 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200821074549epoutp0466e3c27ab4e1e0c667ad02249b28b9c5~tONl4EPrs1974419744epoutp04N for ; Fri, 21 Aug 2020 07:45:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200821074549epoutp0466e3c27ab4e1e0c667ad02249b28b9c5~tONl4EPrs1974419744epoutp04N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1597995949; bh=2+53xcHFCjgELMf4X3YPM+muDniBJtUmbh8iQTB7pl0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jrAahD8wjWkV/l8lbdx7XgvoVowvobpPBGW1+Q4RX9cLnE+sSHye1jq1ijRPy+eZx dVxvGIYJSrZP4O0uFCt2Isx9Lv4cnEN07sR1ue8SgkES+KGO8LdNgBVl1ZdAoBiHoG 4sr8gzfFoUYI0u0QiMg1NNNdZ39HZDZlSLppforw= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20200821074548epcas2p1327d7d86f491d1e27975c1242758a78b~tONlDT0C83190931909epcas2p1L; Fri, 21 Aug 2020 07:45:48 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.40.191]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4BXtqG3P8PzMqYm0; Fri, 21 Aug 2020 07:45:46 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 2F.06.19322.9AB7F3F5; Fri, 21 Aug 2020 16:45:45 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20200821074545epcas2p23109c52bfe76a58b26ba1f509cb86165~tONhu-RjS0792807928epcas2p2h; Fri, 21 Aug 2020 07:45:45 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200821074544epsmtrp13b02268595ebe56c8b2715fd355c1038~tONht6LLR0929109291epsmtrp1V; Fri, 21 Aug 2020 07:45:44 +0000 (GMT) X-AuditID: b6c32a45-797ff70000004b7a-00-5f3f7ba969a2 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id C3.B5.08382.8AB7F3F5; Fri, 21 Aug 2020 16:45:44 +0900 (KST) Received: from KEI (unknown [12.36.155.227]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200821074544epsmtip1e7d25fed313408de35eeeb6dd2b14396~tONheg87B0588805888epsmtip1C; Fri, 21 Aug 2020 07:45:44 +0000 (GMT) Date: Fri, 21 Aug 2020 16:38:13 +0900 From: Cho KyongHo To: Brian Starkey Cc: Hyesoo Yu , sumit.semwal@linaro.org, minchan@kernel.org, akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, joaodias@google.com, linux-mm@kvack.org, surenb@google.com, vbabka@suse.cz, afd@ti.com, benjamin.gaignard@linaro.org, lmark@codeaurora.org, labbott@redhat.com, john.stultz@linaro.org, christian.koenig@amd.com, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, nd@arm.com Subject: Re: [PATCH 0/3] Chunk Heap Support on DMA-HEAP Message-ID: <20200821073813.GA190335@KEI> MIME-Version: 1.0 In-Reply-To: <20200819132204.2rki3xsczdy2cpsk@DESKTOP-E1NTVVP.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) X-Brightmail-Tracker: H4sIAAAAAAAAA01Te0xTZxTfd9veXsgqlwL6haFiJ1sg41FY4UOEgYq529SxLO6VzdLADRBL aXqpGzgzZPKWIgI63jU8lAKDIAqjAqEwHh0qQQREGBE2DYTHAshgBreWCwn//c45v9/3+845 OQRHWMy3J6IUsbRKIZOLcEvu3U5n5Fp1/gOph67FCS0as/moqK4GR4kGI46mjAMAzU/qeai0 6wEPDb1cxNFG2gAPVWX8hKN/tFMc1P/KFVXdW8PQytAzDD1qKcLR5fo7PPRHzX88VNA3jKHK l4t81H/zMgcltXbxkXFimY9yBrU4KryoAYF7qKTBDZyqKakB1CNNJkZpG9RUgy4NpxqWrvKp 9PkhjBofvodTvT+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r1gfX70tlha2EXvjg6y8s3Zjp10KPT uah6xWDHFkoWgd36tL6ya2D8UdmCnpn4PMPVYiv7myU08QppAK7WKP4A2KcPc3MDAAA= X-CMS-MailID: 20200821074545epcas2p23109c52bfe76a58b26ba1f509cb86165 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----lWUYs60uNheWdrlwd5Sxb-jVEnyT8vPvqGqUNsoxLEsY2Otg=_4f1bd_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200818074547epcas2p21e0c2442873d03800c7bc2c3e76405d6 References: <20200818080415.7531-1-hyesoo.yu@samsung.com> <20200818105557.svky5c7gdvk6khzu@DESKTOP-E1NTVVP.localdomain> <20200819034626.GB70898@KEI> <20200819132204.2rki3xsczdy2cpsk@DESKTOP-E1NTVVP.localdomain> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------lWUYs60uNheWdrlwd5Sxb-jVEnyT8vPvqGqUNsoxLEsY2Otg=_4f1bd_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Hi Brain, On Wed, Aug 19, 2020 at 02:22:04PM +0100, Brian Starkey wrote: > Hi KyongHo, > > On Wed, Aug 19, 2020 at 12:46:26PM +0900, Cho KyongHo wrote: > > I have seriously considered CPA in our product but we developed our own > > because of the pool in CPA. > > Oh good, I'm glad you considered it :-) > > > The high-order pages are required by some specific users like Netflix > > app. Moreover required number of bytes are dramatically increasing > > because of high resolution videos and displays in these days. > > > > Gathering lots of free high-order pages in the background during > > run-time means reserving that amount of pages from the entier available > > system memory. Moreover the gathered pages are soon reclaimed whenever > > the system is sufferring from memory pressure (i.e. camera recording, > > heavy games). > > Aren't these two things in contradiction? If they're easily reclaimed > then they aren't "reserved" in any detrimental way. And if you don't > want them to be reclaimed, then you need them to be reserved... > > The approach you have here assigns the chunk of memory as a reserved > CMA region which the kernel is going to try not to use too - similar > to the CPA pool. > > I suppose it's a balance depending on how much you're willing to wait > for migration on the allocation path. CPA has the potential to get you > faster allocations, but the downside is you need to make it a little > more "greedy". > I understand why you think it as contradiction. But I don't think so. Kernel page allocator now prefers free pages in CMA when allocating movable pages by commit https://lore.kernel.org/linux-mm/CAAmzW4P6+3O_RLvgy_QOKD4iXw+Hk3HE7Toc4Ky7kvQbCozCeA@mail.gmail.com/ . We are trying to reduce unused pages to improve performance. So, unused pages in a pool should be easily reclaimed. That is why we does not secure free pages in a special pool for a specific usecase. Instead we have tried to reduce performance bottle-necks in page migration to allocate large amount memory when the memory is needed. ------lWUYs60uNheWdrlwd5Sxb-jVEnyT8vPvqGqUNsoxLEsY2Otg=_4f1bd_ Content-Type: text/plain; charset="utf-8" ------lWUYs60uNheWdrlwd5Sxb-jVEnyT8vPvqGqUNsoxLEsY2Otg=_4f1bd_--