Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755256AbbHQNyw (ORCPT ); Mon, 17 Aug 2015 09:54:52 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36086 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbbHQNyu (ORCPT ); Mon, 17 Aug 2015 09:54:50 -0400 Date: Mon, 17 Aug 2015 15:54:48 +0200 From: Michal Hocko To: Ben Hutchings Cc: Andrew Morton , LKML Subject: Re: [PATCH] mm: Change global memory state symbols to GPL-only Message-ID: <20150817135448.GB10928@dhcp22.suse.cz> References: <1439682147.10857.99.camel@decadent.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439682147.10857.99.camel@decadent.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2002 Lines: 68 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. How does the external and !GPL fs does slab reclaim? Those are essential for the proper memory balancing. You are probably right about vm_stat though. Those counters should be out of those modules. > Signed-off-by: Ben Hutchings > --- > mm/vmscan.c | 4 ++-- > mm/vmstat.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > 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); > > /* > * 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); > > #define SHRINK_BATCH 128 > > 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_smp; > -EXPORT_SYMBOL(vm_stat); > +EXPORT_SYMBOL_GPL(vm_stat); > > #ifdef CONFIG_SMP > > -- > 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 spent > in finding mistakes in my own programs. - Maurice Wilkes, 1949 > -- Michal Hocko SUSE Labs -- 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/