From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753436AbcDDNR2 (ORCPT ); Mon, 4 Apr 2016 09:17:28 -0400 Received: from foss.arm.com ([217.140.101.70]:45113 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbcDDNR0 (ORCPT ); Mon, 4 Apr 2016 09:17:26 -0400 Date: Mon, 4 Apr 2016 15:17:18 +0200 From: John Einar Reitan To: Minchan Kim Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, jlayton@poochiereds.net, bfields@fieldses.org, Vlastimil Babka , Joonsoo Kim , koct9i@gmail.com, aquini@redhat.com, virtualization@lists.linux-foundation.org, Mel Gorman , Hugh Dickins , Sergey Senozhatsky , Rik van Riel , rknize@motorola.com, Gioh Kim , Sangseok Lee , Chan Gyun Jeong , Al Viro , YiPing Xu Subject: Re: [PATCH v3 00/16] Support non-lru page migration Message-ID: <20160404131718.GA18963@e106921-lin.trondheim.arm.com> Mail-Followup-To: Minchan Kim , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, jlayton@poochiereds.net, bfields@fieldses.org, Vlastimil Babka , Joonsoo Kim , koct9i@gmail.com, aquini@redhat.com, virtualization@lists.linux-foundation.org, Mel Gorman , Hugh Dickins , Sergey Senozhatsky , Rik van Riel , rknize@motorola.com, Gioh Kim , Sangseok Lee , Chan Gyun Jeong , Al Viro , YiPing Xu References: <1459321935-3655-1-git-send-email-minchan@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <1459321935-3655-1-git-send-email-minchan@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 30, 2016 at 04:11:59PM +0900, Minchan Kim wrote: > Recently, I got many reports about perfermance degradation > in embedded system(Android mobile phone, webOS TV and so on) > and failed to fork easily. >=20 > The problem was fragmentation caused by zram and GPU driver > pages. Their pages cannot be migrated so compaction cannot > work well, either so reclaimer ends up shrinking all of working > set pages. It made system very slow and even to fail to fork > easily. >=20 > Other pain point is that they cannot work with CMA. > Most of CMA memory space could be idle(ie, it could be used > for movable pages unless driver is using) but if driver(i.e., > zram) cannot migrate his page, that memory space could be > wasted. In our product which has big CMA memory, it reclaims > zones too exccessively although there are lots of free space > in CMA so system was very slow easily. >=20 > To solve these problem, this patch try to add facility to > migrate non-lru pages via introducing new friend functions > of migratepage in address_space_operation and new page flags. >=20 > (isolate_page, putback_page) > (PG_movable, PG_isolated) >=20 > For details, please read description in > "mm/compaction: support non-lru movable page migration". Thanks, this mirrors what we see with the ARM Mali GPU drivers too. One thing with the current design which worries me is the potential for multiple calls due to many separated pages being migrated. On GPUs (or any other device) which has an IOMMU and L2 cache, which isn't coherent with the CPU, we must do L2 cache flush & invalidation per page. I guess batching pages isn't easily possible? --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQGcBAABCAAGBQJXAmlZAAoJEPmPNPdCQ4pIlBwL/1pxZRdGGS+YVXOWnKmLrVhR LwzyVmu02A7lMgHXoAMGHuWaH06mGRLfwgjU56fi2JnLeNkHR/wpR95gGckvS8zd xQmogKXU4ZE8xbqqft6qwxv3IE+mGkwCPMGrLVjvgfKR0/iJ7ojQYN9fhoV1Z3br Pn0/lhMdOqo1jnHHmMDp9PD6s32l3SdnISfjHXF72fSA5u4Uv/kITReSyRgaWQSB efJjZjM7QPPHomeUcy1u/ZdbJYI5FRnZpaNJMGuCX8d7hnlIu1WS7zdlJzhMs3qi mzU5/49J/eoycEadTFJD9VsvKKO0W5GpPP03A2PEHcsiGv3mEqjsnomNNCBLfebO 2bT8pMYR3VV7/+W/DjEOvMvlWCrq01uxuJIcjJVpoC3Wh6aMJW8fX1Po8RZQIfRb +en68y8EocFXu1oevCEP2jBUmBpd/uXzLUStbHDbijDH3G53PBBsv8msFpm9HIfM Ice5LUXN2cBJcmwD0KwZwn9a2SUoy/NQesE50nBfSA== =0/aR -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--