Provide a shim layer for reference counted pages
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 23 Aug 2016 20:54:38 +0000 (16:54 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 29 Nov 2016 16:27:40 +0000 (11:27 -0500)
commitb75520f6e0ec68e0325a3764cfcb4d9b836c65da
tree83c1f4afeb6cd29d2bf35b7bf1db0837df18b995
parente5761f2a57cf8aa10c2f02ced71eea5298a9847b
Provide a shim layer for reference counted pages

Right now, all pages are reference counted.  I'd like to try to stop doing
that to make contig allocations and maybe jumbo pages easier.  Longer term,
I'd like to get away from having a page struct too, though we'll see.

Some code, specifically mlx4, wants page allocations and to do reference
counting per page.  For that code, we provide this shim.

It actually looks like there are some bugs in mlx4's allocation/freeing
code, and how they account for fragments and references for higher-order
allocations.  Linux 4.7 seems to have the same structure, though perhaps
their are different semantics there.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/net/mlx4/en_rx.c
kern/drivers/net/mlx4/mlx4_en.h
kern/include/linux_compat.h
kern/include/refd_pages.h [new file with mode: 0644]