Re: [RFC] Tagging of vmalloc pages for supporting the pmalloc allocator

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

 



On Mon 07-08-17 14:26:21, Igor Stoppa wrote:
> On 04/08/17 11:12, Michal Hocko wrote:
> > On Fri 04-08-17 11:02:46, Igor Stoppa wrote:
> 
> [...]
> 
> >> struct page {
> >>   /* First double word block */
> >>   unsigned long flags;		/* Atomic flags, some possibly
> >> 				 * updated asynchronously */
> >> union {
> >> 	struct address_space *mapping;	/* If low bit clear, points to
> >> 					 * inode address_space, or NULL.
> >> 					 * If page mapped as anonymous
> >> 					 * memory, low bit is set, and
> >> 					 * it points to anon_vma object:
> >> 					 * see PAGE_MAPPING_ANON below.
> >> 					 */
> >> ...
> >> }
> >>
> >> mapping seems to be used exclusively in 2 ways, based on the value of
> >> its lower bit.
> > 
> > Not really. The above applies to LRU pages. Please note that Slab pages
> > use s_mem and huge pages use compound_mapcount. If vmalloc pages are
> > using none of those already you can add a new field there.
> 
> Yes, both from reading the code and some experimentation, it seems that
> vmalloc is not using either field.
> 
> I'll add a vm_area field as you advised.
> 
> Is this something I could send as standalone patch?

Yes I would start that way and also look at some find_vm_area callers
and maybe they can be simplified. The most obvious one being
task_struct::stack_vm_area but I have to confess I haven't checked that
too deeply.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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