Re: [GIT PULL] Memory folios for v5.15

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2021-08-24 19:25:41
Also in
linux-fsdevel, lkml
Reply to
David Howells, 2021-08-24
On Tue, Aug 24, 2021 at 12:11 PM David Howells [off-list ref] wrote:
"page_group"?  I would suggest "pgroup", but that's already taken.  Maybe
"page_set" with "pset" as a shorthand pointer name.  Or "struct pset/pgset"?
Please don't do the "shorthand" thing. Names like "pset" and "pgroup"
are pure and utter garbage, and make no sense and describe nothing at
all.

If you want a pointer name and don't need a descriptive name because
there is no ambiguity, you might as well just use 'p'. And if you want
to make it clear that it's a collection of pages, you might as well
use "pages".

Variable naming is one thing, and tere's nothing wrong with variable
names like 'i', 'p' and 'pages'. The variable name should come from
the context, and 'a' and 'b' can make perfect sense (and 'new' and
'old' can be very good names that clarify what the usage is - C++
people can go pound sand, they mis-designed the language keywords).

But the *type* name should describe the type, and it sure shouldn't be
anything like pset/pgroup.

Something like "page_group" or "pageset" sound reasonable to me as type names.

                      Linus
Thread (161 messages) 161 messages, 27 authors, last reply 2021-10-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help