Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755470AbbHQO4m (ORCPT ); Mon, 17 Aug 2015 10:56:42 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:46265 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965AbbHQO4l (ORCPT ); Mon, 17 Aug 2015 10:56:41 -0400 Message-ID: <1439823392.10801.16.camel@decadent.org.uk> Subject: Re: [PATCH] mm: Change global memory state symbols to GPL-only From: Ben Hutchings To: Michal Hocko Cc: Andrew Morton , LKML Date: Mon, 17 Aug 2015 16:56:32 +0200 In-Reply-To: <20150817135448.GB10928@dhcp22.suse.cz> References: <1439682147.10857.99.camel@decadent.org.uk> <20150817135448.GB10928@dhcp22.suse.cz> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+uOV7th0cK1d58NKRKty" X-Mailer: Evolution 3.16.3-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 141.70.66.223 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 Content-Length: 3657 Lines: 111 --=-+uOV7th0cK1d58NKRKty Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 participate > > in shrinking. >=20 > How does the external and !GPL fs does slab reclaim? Those are essential > for the proper memory balancing. If they know how to do shrinking on Linux then they are probably derivative works of Linux. Ben. > You are probably right about vm_stat though. Those counters should be > out of those modules. >=20 > > Signed-off-by: Ben Hutchings > > --- > > mm/vmscan.c | 4 ++-- > > mm/vmstat.c | 2 +- > > 2 files changed, 3 insertions(+), 3 deletions(-) > >=20 > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index 8286938..e6e7449 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -247,7 +247,7 @@ int register_shrinker(struct shrinker *shrinker) > > > > > > up_write(&shrinker_rwsem); > > > > > > return 0; > > } > > -EXPORT_SYMBOL(register_shrinker); > > +EXPORT_SYMBOL_GPL(register_shrinker); > > =20 > > /* > > * Remove one > > @@ -259,7 +259,7 @@ void unregister_shrinker(struct shrinker *shrinker) > > > > > > up_write(&shrinker_rwsem); > > > > > > kfree(shrinker->nr_deferred); > > } > > -EXPORT_SYMBOL(unregister_shrinker); > > +EXPORT_SYMBOL_GPL(unregister_shrinker); > > =20 > > #define SHRINK_BATCH 128 > > =20 > > diff --git a/mm/vmstat.c b/mm/vmstat.c > > index 4f5cd97..6d3f8f4 100644 > > --- a/mm/vmstat.c > > +++ b/mm/vmstat.c > > @@ -87,7 +87,7 @@ void vm_events_fold_cpu(int cpu) > > * vm_stat contains the global counters > > */ > > atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS] __cacheline_aligned_in_sm= p; > > -EXPORT_SYMBOL(vm_stat); > > +EXPORT_SYMBOL_GPL(vm_stat); > > =20 > > #ifdef CONFIG_SMP > > =20 > > --=20 > > Ben Hutchings > > [W]e found...that it wasn't as easy to get programs right as we had tho= ught. > > ... I realized that a large part of my life from then on was going to b= e spent > > in finding mistakes in my own programs. - Maurice Wilkes, 1949 > >=20 >=20 >=20 >=20 --=20 Ben Hutchings [W]e found...that it wasn't as easy to get programs right as we had thought= . ... I realized that a large part of my life from then on was going to be sp= ent in finding mistakes in my own programs. - Maurice Wilkes, 1949 --=-+uOV7th0cK1d58NKRKty Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAVdH2IOe/yOyVhhEJAQrXxw/+NUdEl2D4NDZtUF4E1tpK4rsilG8TI4w/ ZtpxuafolbVsDM//gNOrPoDPhTn/u8GWpBH1LsjxeRz/NprkvLiKQQM2rPCDHgQv hz3y5EI4DzviRicpB60n3dIjHi3Xi+y6nK/x//T5sE1Mz/4WCOXan+Zo8uBAZMxX +4TWL+khaTvqSwnXUp3hJGwg+/tLPRSh0EOGCZn+XcFiNWKXsq1JjEFMNwLAVuDs DjRjcPTSQsRMVEnl4Bx/Uoq3gGgk1nm35jIBzrOnRYT/KRtJyIvaH3qmoiGZRs/P Y2607FxiaZJoeLkTwFfkcWipCQNYO7spZek4HM7HNch2x1V/tDPrhXi1T1BBklax l5Ow/EuNK9poGTqXSBi5W3AuBGrP6T/nWCs6QhkHnl+vi+82U1vWfLe6Lk1rzzTq iVmcw7VW6in6Jm4X+4MtzK1WbWFI68CN96KI/wT+m5AhyZYc3Ep2eLbShKM2dLXb 74cqW8GGJ999t5oTNAg6oZXy2q/voKdUz/hvBBQDq1Bbrol2toPQzqcx2ePuJkoE Pq5Oi5ETi27efw9tG+80IZWr9juiLVofj4i9ILQkTEZNQRgjeEEzFU4CP22BZtry b0j05xCdf6nmGKv6dqgvyWNLcuIrA28Id7Tg9crMEBMWHvnlQFWY32o2HbRHUibW 8QdHIow/XME= =n1N3 -----END PGP SIGNATURE----- --=-+uOV7th0cK1d58NKRKty-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/