From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753787AbbIANWL (ORCPT ); Tue, 1 Sep 2015 09:22:11 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:53829 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752101AbbIANWJ (ORCPT ); Tue, 1 Sep 2015 09:22:09 -0400 Message-ID: <1441113703.9215.30.camel@decadent.org.uk> Subject: Re: [PATCH] mm: Change global memory state symbols to GPL-only From: Ben Hutchings To: Richard Yao Cc: Andrew Morton , Michal Hocko , Brian Behlendorf , LKML Date: Tue, 01 Sep 2015 14:21:43 +0100 In-Reply-To: <20150901012453.GA16646@woodpecker.gentoo.org> References: <20150901012453.GA16646@woodpecker.gentoo.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-wGaMwhScxxyPISFn14Ib" X-Mailer: Evolution 3.16.3-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.4.249 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-wGaMwhScxxyPISFn14Ib Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-09-01 at 01:24 +0000, Richard Yao wrote: > On Mon, 2015-08-17 09:56:55 -0700, Ben Hutchings wrote: > > On Mon, 2015-08-17 at 17:11 +0200, Michal Hocko wrote: > > > On Mon 17-08-15 16:56:32, Ben Hutchings wrote: > > > > On Mon, 2015-08-17 at 15:54 +0200, Michal Hocko wrote: > > > > > On Sun 16-08-15 01:42:27, Ben Hutchings wrote: > > > > > > Proprietary modules should not be able to touch vm_stat or=20 > > > > > > participate > > > > > > in shrinking. > > > > >=20 > > > > > How does the external and !GPL fs does slab reclaim? Those=20 > > > > > are essential > > > > > for the proper memory balancing. > > > >=20 > > > > If they know how to do shrinking on Linux then they are=20 > > > > probably > > > > derivative works of Linux. > > >=20 > > > I am not sure I understand. They are shrinking their internal=20 > > > cached > > > objects and that is hardly a derivative work. The shrinker API is=20 > > > only > > > meant to let them know _when_ this should happen and the=20 > > > interface is > > > a pretty much simple callback API. > >=20 > > It is a Linux-specific API and I don't think other kernels provide > > something similar to loadable modules. It enables a module to turn=20 > > a > > large part of the system RAM into a cache and have the MM=20 > > effectively > > tell it the correct size of that cache, thus tightly integrating=20 > > with > > global memory management. >=20 > The idea of providing third party drivers with the hooks that they=20 > need to > respond to memory pressure is by no means Linux-specific. In=20 > OpenSolaris, there > are counters for drivers to keep track of memory usage and try to=20 > stay ahead of > it, which works because there is no direct reclaim. There are also=20 > callbacks > for the SLAB code to defragment the caches used by the drivers.=20 So you confirm that the Linux and Solaris APIs for this are quite different. > Giving non-GPL > drivers to respond to memory pressure seems reasonable. I don't see why. [...] > > Yes, that's the idea, proprietary code should not be helped in this > > way. >=20 > The ZFSOnLinux kernel driver uses these symbols. It is fully open=20 > source and > not proprietary. [...] It's not GPL-compatible, which in terms of Linux kernel modules is no better than proprietary. Ben. --=20 Ben Hutchings The first rule of tautology club is the first rule of tautology club. --=-wGaMwhScxxyPISFn14Ib Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAVeWmZ+e/yOyVhhEJAQqwJQ//fFZ2saLACAirsbEONwc1urdsvAcB4v1T 47X3xhd3mnV+qoali7FLBvqsyOxvMM9Soib/CxvFAXMxWU6RpGNvvotwqVCLYQXB oYjycyc5wGX5OlZCKZMMkOwebpSMHPNKzUP/lJRdAOpcQ4Qpfu7OuVAdp9sJdnQZ pwen+4gW9fKFtIOvBIcwXD/aCvF69W0FbMqFYrH9cDTmnNDOkx7xQXB4fI31z19M vDVqZnx7dP1Fg6E5/I8YfxW3jK2FPHJB3tq1Uly7FZecldwo8R9XZv8nVHYt2/Z7 zwGEQDBTfy1iIN8Iejx4dg2pdaqQzwF/4Y/E3o0hQSX10NO7rrN2Gpk9P2wJwtV8 ZKvW/QhEBCR1refGO+dhJ2nhzMOEYhL6znxopXWXxQBetUQurYFEfVpdbx0scFxv PbvJRE5FoxdFWVv4kW4lLmcbauZtdjogSVZDE4vLyUlIoPyb2DKZ1IYlLV2GOfca V3Hzc9SI7Z17NMfkub4WdpmKZpVZvJm6R7LgW5FQfYigSx6+m3unb4A3ptwx4orX 38tgCVa1vbKFLk0zTBIB9RSfcVM2xcF0Mc+qD1cYUNi+tgwa8whvYYnVymg1OaXu 6YvoGgRivUwuGnqulR40fxuLN7crkIOg20bDJGBq/40C3kbI6po+mecgmQufQzNK zS3AKIinuNs= =pv4J -----END PGP SIGNATURE----- --=-wGaMwhScxxyPISFn14Ib--