Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 12, 2021 at 07:33:33PM +0800, Muchun Song wrote:
> > It seems a bit odd to only pass "start" for the BUG_ON.
> > Also, I kind of dislike the "addr += PAGE_SIZE" in vmemmap_pte_range.
> >
> > I wonder if adding a ".remap_start_addr" would make more sense.
> > And adding it here with the vmemmap_remap_walk init.
> 
> How about introducing a new function which aims to get the reuse
> page? In this case, we can drop the BUG_ON() and "addr += PAGE_SIZE"
> which is in vmemmap_pte_range. The vmemmap_remap_range only
> does the remapping.

How would that look? 
It might be good, dunno, but the point is, we should try to make the rules as
simple as possible, dropping weird assumptions.

Callers of vmemmap_remap_free should know three things:

- Range to be remapped
- Addr to remap to
- Current implemantion needs addr to be remap to to be part of the complete
  range

right?

-- 
Oscar Salvador
SUSE L3




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux