Whamcloud - gitweb
LU-16724 ptlrpc: refactor page pools patch 1
This is a combined series that refactors the page pools
code to make it more readable. It used to be many
separate patches but has been combined in to just three,
and this is the first.
LU-16724 ptlrpc: rename 'pool' to 'pool_idx'
'pool' here is the index of the pool, not the pool itself.
Let's give it a name that makes clear it's a number and not
the actual pool.
Also remove an error condition which is asserted on
immediately before.
LU-16724 ptlrpc: rename 'size_bits' to 'order'
The kernel uses 'order' to refer to page allocations of a
certain 'order', meaning 2^order pages.
That's what our 'size bits' is - an allocation of a certain
'order'.
Change-Id-Was: I38b184239814a0f692b644566075c798ed16f816
LU-16724 ptlrpc: rename get_buf to get_pages
The sptlrpc_enc_pool_get_buf function actually gets a fixed
number of pages, which is sort of a buffer, but is better
understood as a set of pages.
Rename the function for getting pages for a ptlrpc desc so
we can give get_buf a more appropriate name.
Change-Id-Was: I9c03b9d638e7df7f09bf5724c5a6896b7d1e7b6c
LU-16724 ptlrpc: improve usage of PAGES_POOL
PAGES_POOL isn't always used when it should be, let's
improve that a bit (and start renaming a function).
Change-Id-Was: Ifed59db63d15d61d15712e6df6b8dbae56f2f5b7
LU-16724 ptlrpc: start removing 'enc' from pool
Pools are no longer encryption page pools, start renaming
them accordingly. (The 'epp' naming in the struct has been
left for the next patch.)
Change-Id-Was: Iba3c98641e24173d95bf8bcf0df2424bbabf3ef9
LU-16724 ptlrpc: rename 'epp' to 'ppp'
Finish removing 'encryption' from page pool names except
for the module parameter, which is exposed in configuration
and so can't be changed.
Change-Id-Was: I1c14f6cf8cf1a19d89b5a7787aac1b67203866d3
LU-16724 ptlrpc: remove more uses of 'enc'
Remove a few more uses of 'enc' and note some we aren't
changing.
Change-Id-Was: Iaaf6c23ea295b22ded2e8942227ebd5ce4d34e13
LU-16724 ptlrpc: improve use of 'count'
This is a first trivial step towards fixing usage of
'count' in the page pools code. (And a whitespace fix.)
Change-Id-Was: Ic4f74db74b8cec63572d5fd5b129f861ab0cba7c
LU-16724 ptlrpc: simplify pools_should_grow
This patch is a prelude to replacing "pools_should_grow()"
with a "grow_pool" function. (The odd plural will be
removed shortly.)
Change-Id-Was: I0accbce2c36fa97684fbee364057b8ff2f9ae12d
LU-16724 ptlrpc: correct use of plural 'pools'
There are a bunch of spots which refer to a single pool by
pool index, but which say 'pools'. This is very confusing,
and in fact led to me misunderstanding the code at least
once.
Clean that up.
Change-Id-Was: I9eabcfe77a57a82c87b36e3b3e040be91671fbfb
LU-16724 ptlrpc: reduce usage of pool_index
The pool index is used over and over a lot of places where
we should just use it once.
Note the printing functions are deliberately not combined
to maximum length lines for ease of reading.
Change-Id-Was: I7efbf491cf28f6fd16d06f5bbc42d714c908f34c
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I636a4756a033d0b96a4772b8912f61c4b31b9c64
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52634
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>