Re: [RFC] free_pages stuff

From: Linus Torvalds
Date: Mon Dec 21 2015 - 19:03:19 EST


On Mon, Dec 21, 2015 at 3:46 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> FWIW, I'd done a proof-of-concept patch series converting the things
> to
> * free_page() and free_pages() taking the address to free as a pointer
> * get_zeroed_page() returning a pointer
> * get_free_page()/get_free_pages() added, both returning a pointer
> * __get_dma_pages() replaced with get_dma_page() (again, returns
> a pointer)

Absolutely not.

I will not take this, and it's stupid in the extreme.

No way in hell do we suddenly change the semantics of an interface
that has been around from basically day #1. That's just crazy talk.

Just looking at the diffstat should have made you realize that this is
stupid. The confusion it causes, the pain it causes for backports, and
just the fundamental idiocy of changing an long-standing interface
without changing the name is just not acceptable.

If you want to have versions of the function that return pointers, you
had damn well better give them new names. Not use the same name for a
different function, causing confusion and forcing this kind of crazy
"change everything at once" flag-day patches, and pain for
backporting.

And quite frankly, even the "new name" is likely a bad idea. If you
want to allocate a page, and get a pointer, just use "kmalloc()".
Boom, done!

So I don't know how many ways I can say "NO", but I'll not take
anythign like this. It's *completely* wrong.

Linus
--
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/