Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4656352yba; Mon, 20 May 2019 01:07:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7qWypFY1jeMZdWVJ32SO8NPPyS4FAGXbSyBin+/+MCJ7CrUbAMY0RpgifDT19kuwwUNDr X-Received: by 2002:a63:5c4c:: with SMTP id n12mr74471594pgm.111.1558339637210; Mon, 20 May 2019 01:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558339637; cv=none; d=google.com; s=arc-20160816; b=DmLa/FUmrq76F2yQb1f2bEheupcBkoZQ1mV7WxlDPXXkYmKYIBAveMQz1IwPbQ2AJs dFSxDDSVmsppg3jeHTEiHUmQwhb8C5A/TkDKXFVnK33Uzs/XWWDYg+kv/qIOg9N7C2J2 6b3bOcgQS2jyNxMxGqlBmMeCUw5LdI3MgR3JIV0OjGvwzViHPcftZXzkkYL11JYRNgZc x4+DiGAUxQtuDkYcn3TkODz0+SNY3BYjdwfbMmPxdJehpIEBvdoyinV+9pzeVBX28u3z Es2xlI3JaapOxVznFXVrw94IPxTRkjw+wXfRfcX8tKT0tYku6xt/m/aaQZy2Jg+lLv6a EjSg== 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; bh=s0XqirjLJZRgntQEz1NJdbFOSqFoBHPPpWP02WQVEHM=; b=iqjODdqF3rSe1y2uDkyz7YewDk76DptorgUb041i33rI6lJbWXNvJW/YDLBe0FZCGN wBx1idr7zop1X013Hk/S4dGbToGsVQgeFitUPffPrayZY1o1oNpgWyn2u7DHJ3KzhYTx g0L3En+PXVd+8nIMjq7qL9SR+uGC7Q8acmlFFe7B3EnpbrnetYTYlHQ6FKinkRgbo2k/ g3ivEMtG3vfc+LwiAb+Jy0MUpyiAvNRJqIFolstH5RCZqWGpwdKFkVl0T2rOROpTz1RV wVeaPuaQ6rVtp0Q73LjuklJgqzacsOSvwwXymHCeh2bDJSVjZH05X1wY+yHqBkmZlyRo UMGg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z184si18784065pfb.219.2019.05.20.01.07.02; Mon, 20 May 2019 01:07:17 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730222AbfETGhe (ORCPT + 99 others); Mon, 20 May 2019 02:37:34 -0400 Received: from foss.arm.com ([217.140.101.70]:38168 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfETGhd (ORCPT ); Mon, 20 May 2019 02:37:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 571BA80D; Sun, 19 May 2019 23:37:33 -0700 (PDT) Received: from [10.162.41.132] (p8cg001049571a15.blr.arm.com [10.162.41.132]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 34EA53F575; Sun, 19 May 2019 23:37:28 -0700 (PDT) Subject: Re: [RFC 0/7] introduce memory hinting API for external process To: Minchan Kim , Andrew Morton Cc: LKML , linux-mm , Michal Hocko , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon References: <20190520035254.57579-1-minchan@kernel.org> From: Anshuman Khandual Message-ID: Date: Mon, 20 May 2019 12:07:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190520035254.57579-1-minchan@kernel.org> Content-Type: text/plain; charset=utf-8 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 05/20/2019 09:22 AM, Minchan Kim wrote: > - Problem > > Naturally, cached apps were dominant consumers of memory on the system. > However, they were not significant consumers of swap even though they are > good candidate for swap. Under investigation, swapping out only begins > once the low zone watermark is hit and kswapd wakes up, but the overall > allocation rate in the system might trip lmkd thresholds and cause a cached > process to be killed(we measured performance swapping out vs. zapping the > memory by killing a process. Unsurprisingly, zapping is 10x times faster > even though we use zram which is much faster than real storage) so kill > from lmkd will often satisfy the high zone watermark, resulting in very > few pages actually being moved to swap. Getting killed by lmkd which is triggered by custom system memory allocation parameters and hence not being able to swap out is a problem ? But is not the problem created by lmkd itself. Or Is the objective here is reduce the number of processes which get killed by lmkd by triggering swapping for the unused memory (user hinted) sooner so that they dont get picked by lmkd. Under utilization for zram hardware is a concern here as well ? Swapping out memory into zram wont increase the latency for a hot start ? Or is it because as it will prevent a fresh cold start which anyway will be slower than a slow hot start. Just being curious.