From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753642AbcBWPkI (ORCPT ); Tue, 23 Feb 2016 10:40:08 -0500 Received: from shelob.surriel.com ([74.92.59.67]:60774 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751665AbcBWPkG (ORCPT ); Tue, 23 Feb 2016 10:40:06 -0500 Message-ID: <1456241996.7716.34.camel@surriel.com> Subject: Re: [PATCH] mm,vmscan: compact memory from kswapd when lots of memory free already From: Rik van Riel To: Vlastimil Babka , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, hannes@cmpxchg.org, akpm@linux-foundation.org, mgorman@suse.de Date: Tue, 23 Feb 2016 10:39:56 -0500 In-Reply-To: <56CC23F7.8010709@suse.cz> References: <20160222225054.1f6ab286@annuminas.surriel.com> <56CC23F7.8010709@suse.cz> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-/CMF2PcXH/BNIo6zD7Cu" X-Mailer: Evolution 3.18.4 (3.18.4-1.fc23) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-/CMF2PcXH/BNIo6zD7Cu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-02-23 at 10:18 +0100, Vlastimil Babka wrote: > On 02/23/2016 04:50 AM, Rik van Riel wrote: > > If kswapd is woken up for a higher order allocation, for example > > from alloc_skb, but the system already has lots of memory free, > > kswapd_shrink_zone will rightfully decide kswapd should not free > > any more memory. > >=20 > > However, at that point kswapd should proceed to compact memory, on > > behalf of alloc_skb or others. > >=20 > > Currently kswapd will only compact memory if it first freed memory, > > leading kswapd to never compact memory when there is already lots > > of > > memory free. > >=20 > > On my home system, that lead to kswapd occasionally using up to 5% > > CPU time, with many man wakeups from alloc_skb, and kswapd never > > doing anything to relieve the situation that caused it to be woken > > up. >=20 > Hi, >=20 > I've proposed replacing kswapd compaction with kcompactd, so this > hunk=C2=A0 > is gone completely in mmotm. This imperfect comparison was indeed one > of=C2=A0 > the things I've noted, but it's not all: >=20 > http://marc.info/?l=3Dlinux-kernel&m=3D145493881908394&w=3D2 Never mind my patch, then. Your solution is nicer, and already in -mm :) --=20 All Rights Reversed. --=-/CMF2PcXH/BNIo6zD7Cu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJWzH1MAAoJEM553pKExN6D+xoIAJZLpKJroJ3tnswYolFQ0KW+ HxeTgvhsmtJ38Q+PqwFtRz9kt5sOWZCDg5tw0vE8KTfq+o7kd6WeCjGWb11G+jqT b8Ejbk0chKgLKvEEV2rPUP1t2Dlnit1BGQGLQR5nP+cZhnWuHqrUzIcQcLLGo52V vC0zCKNpEa28+59GK8nXNqyW0VmKrc3mT3sY/82IhZBAX4946pOKQxqyL/OTigKG kJbr3ZNWvxYj5PSqHk+4c/BrGgdWHKWg+GCVsEODICLf7sn/RIGGc9OpIEEdGwxY upcdIKq5/U/RYpMqLKm7UYzRzCbW2kQVwlMKbVwpTBhmf5+kYxulLr0bC7ibBIU= =WYO5 -----END PGP SIGNATURE----- --=-/CMF2PcXH/BNIo6zD7Cu--