Re: [PATCH v4 2/2] mm: make lru_add_drain_all() selective

From: Andrew Morton
Date: Tue Aug 13 2013 - 17:16:27 EST


On Tue, 13 Aug 2013 17:07:19 -0400 Tejun Heo <tj@xxxxxxxxxx> wrote:

> > I don't recall seeing such abuse. It's a very common and powerful
> > tool, and not implementing it because some dummy may abuse it weakens
> > the API for all non-dummies. That allocation is simply unneeded.
>
> More powerful and flexible doesn't always equal better and I think
> being simple and less prone to abuses are important characteristics
> that APIs should have.

I've yet to see any evidence that callback APIs have been abused and
I've yet to see any reasoning which makes me believe that this one will
be abused.

> It feels a bit silly to me to push the API
> that way when doing so doesn't even solve the allocation problem.

It removes the need to perform a cpumask allocation in
lru_add_drain_all().

> It doesn't really buy us much while making the interface more complex.

It's a superior interface.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/