mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Richard Yao <ryao@gentoo.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@kernel.org>,
	Brian Behlendorf <behlendorf@llnl.gov>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: Change global memory state symbols to GPL-only
Date: Tue, 01 Sep 2015 14:21:43 +0100	[thread overview]
Message-ID: <1441113703.9215.30.camel@decadent.org.uk> (raw)
In-Reply-To: <20150901012453.GA16646@woodpecker.gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 2417 bytes --]

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 
> > > > > > participate
> > > > > > in shrinking.
> > > > > 
> > > > > 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.
> > > 
> > > I am not sure I understand. They are shrinking their internal 
> > > cached
> > > objects and that is hardly a derivative work. The shrinker API is 
> > > only
> > > meant to let them know _when_ this should happen and the 
> > > interface is
> > > a pretty much simple callback API.
> > 
> > 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 
> > a
> > large part of the system RAM into a cache and have the MM 
> > effectively
> > tell it the correct size of that cache, thus tightly integrating 
> > with
> > global memory management.
> 
> The idea of providing third party drivers with the hooks that they 
> need to
> respond to memory pressure is by no means Linux-specific. In 
> OpenSolaris, there
> are counters for drivers to keep track of memory usage and try to 
> stay ahead of
> it, which works because there is no direct reclaim. There are also 
> callbacks
> for the SLAB code to defragment the caches used by the drivers. 


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.
> 
> The ZFSOnLinux kernel driver uses these symbols. It is fully open 
> source and
> not proprietary.
[...]

It's not GPL-compatible, which in terms of Linux kernel modules is no
better than proprietary.

Ben.

-- 
Ben Hutchings
The first rule of tautology club is the first rule of tautology club.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  parent reply	other threads:[~2015-09-01 13:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01  1:24 Richard Yao
2015-09-01  2:51 ` Dave Chinner
2015-09-01 13:21 ` Ben Hutchings [this message]
2015-09-01 17:29   ` Richard Yao
  -- strict thread matches above, loose matches on Subject: below --
2015-08-15 23:42 Ben Hutchings
2015-08-17 13:54 ` Michal Hocko
2015-08-17 14:56   ` Ben Hutchings
2015-08-17 15:11     ` Michal Hocko
2015-08-17 16:51       ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441113703.9215.30.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=behlendorf@llnl.gov \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=ryao@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®