mm: replace hpage_nr_pages with thp_nr_pages
The thp prefix is more frequently used than hpage and we should be consistent between the various functions. [akpm@linux-foundation.org: fix mm/migrate.c] Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: William Kucharski <william.kucharski@oracle.com> Reviewed-by: Zi Yan <ziy@nvidia.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: David Hildenbrand <david@redhat.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Link: http://lkml.kernel.org/r/20200629151959.15779-6-willy@infradead.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
af3bbc12df
commit
6c357848b4
@@ -5589,7 +5589,7 @@ static int mem_cgroup_move_account(struct page *page,
|
||||
{
|
||||
struct lruvec *from_vec, *to_vec;
|
||||
struct pglist_data *pgdat;
|
||||
unsigned int nr_pages = compound ? hpage_nr_pages(page) : 1;
|
||||
unsigned int nr_pages = compound ? thp_nr_pages(page) : 1;
|
||||
int ret;
|
||||
|
||||
VM_BUG_ON(from == to);
|
||||
@@ -6682,7 +6682,7 @@ void mem_cgroup_calculate_protection(struct mem_cgroup *root,
|
||||
*/
|
||||
int mem_cgroup_charge(struct page *page, struct mm_struct *mm, gfp_t gfp_mask)
|
||||
{
|
||||
unsigned int nr_pages = hpage_nr_pages(page);
|
||||
unsigned int nr_pages = thp_nr_pages(page);
|
||||
struct mem_cgroup *memcg = NULL;
|
||||
int ret = 0;
|
||||
|
||||
@@ -6912,7 +6912,7 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage)
|
||||
return;
|
||||
|
||||
/* Force-charge the new page. The old one will be freed soon */
|
||||
nr_pages = hpage_nr_pages(newpage);
|
||||
nr_pages = thp_nr_pages(newpage);
|
||||
|
||||
page_counter_charge(&memcg->memory, nr_pages);
|
||||
if (do_memsw_account())
|
||||
@@ -7114,7 +7114,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
|
||||
* ancestor for the swap instead and transfer the memory+swap charge.
|
||||
*/
|
||||
swap_memcg = mem_cgroup_id_get_online(memcg);
|
||||
nr_entries = hpage_nr_pages(page);
|
||||
nr_entries = thp_nr_pages(page);
|
||||
/* Get references for the tail pages, too */
|
||||
if (nr_entries > 1)
|
||||
mem_cgroup_id_get_many(swap_memcg, nr_entries - 1);
|
||||
@@ -7158,7 +7158,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
|
||||
*/
|
||||
int mem_cgroup_try_charge_swap(struct page *page, swp_entry_t entry)
|
||||
{
|
||||
unsigned int nr_pages = hpage_nr_pages(page);
|
||||
unsigned int nr_pages = thp_nr_pages(page);
|
||||
struct page_counter *counter;
|
||||
struct mem_cgroup *memcg;
|
||||
unsigned short oldid;
|
||||
|
Reference in New Issue
Block a user