Code Review for PVN_GETPAGE_SZ-PVN_GETPAGE_NUM-are-misnamed-and-unnecessarily-complicated

Prepared by: (jeffpc) on 2015-May-08 18:05 -0400 EDT
Workspace:/home/jeffpc/illumos/xhat (at 51169685a1d2)
Compare against: HEAD^ (at c6930510b1b6)
Summary of changes: 19 lines changed: 0 ins; 11 del; 8 mod; 10080 unchg
Patch of changes: PVN_GETPAGE_SZ-PVN_GETPAGE_NUM-are-misnamed-and-unnecessarily-complicated.patch
Printable review: PVN_GETPAGE_SZ-PVN_GETPAGE_NUM-are-misnamed-and-unnecessarily-complicated.pdf

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/vm/seg_vn.c

PVN_GETPAGE_{SZ,NUM} are misnamed and unnecessarily complicated
There is really no reason to not allow 8 pages all the time.  With the
current logic, we get the following:
Assuming 4kB pages (x86):
    _SZ  = ptob(8) /* 32kB */
    _NUM = 8
Assuming 8kB pages (sparc):
    _SZ  = ptob(8) /* 64kB */
    _NUM = 8
We'd have to deal with 16kB base pages in order for the _NUM #define to not
be 8 (it'd be 4 in that case).  So, in the spirit of simplicity, let's just
always grab 8 pages as there are no interesting systems with 16kB+ base pages.
Finally, the defines are poorly named.
19 lines changed: 0 ins; 11 del; 8 mod; 10080 unchg

This code review page was prepared using /opt/onbld/bin/webrev. Webrev is maintained by the illumos project. The latest version may be obtained here.