Re: [PATCH 4.19] x86/mm: add cond_resched() in _set_memory_array() and set_memory_array_wb()

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

 



On Sun, Nov 28, 2021 at 12:25:23AM +0800, YangWei wrote:
> 在 2021/11/27 00:36, Greg KH 写道:
> > On Fri, Nov 26, 2021 at 03:32:26PM +0800, Yang Wei wrote:
> > > From: Yang Wei <yang.wei@xxxxxxxxxxxxxxxxx>
> > > 
> > > We found _set_memory_array() and set_memory_array_wb() takes more than
> > > 500ms in kernel space in the following scenario.
> > > So use this patch to trigger schedule for each page, to avoid other
> > > threads getting stuck.
> > > 
> > >      0xffffffff810a34d2 find_next_iomem_res  ([kernel.kallsyms])
> > >      0xffffffff810a3d40 walk_system_ram_range  ([kernel.kallsyms])
> > >      0xffffffff810772ca pat_pagerange_is_ram  ([kernel.kallsyms])
> > >      0xffffffff8107796f reserve_memtype  ([kernel.kallsyms])
> > >      0xffffffff81075e98 _set_memory_array  ([kernel.kallsyms])
> > >      0xffffffffc0ef6083 nv_alloc_system_pages  [nvidia] ([kernel.kallsyms])
> > > 
> > >      0xffffffff810a34d2 find_next_iomem_res  ([kernel.kallsyms])
> > >      0xffffffff810a3d40 walk_system_ram_range  ([kernel.kallsyms])
> > >      0xffffffff810772ca pat_pagerange_is_ram  ([kernel.kallsyms])
> > >      0xffffffff8107745a free_memtype.part.7  ([kernel.kallsyms])
> > >      0xffffffff8107606e set_memory_array_wb  ([kernel.kallsyms])
> > >      0xffffffffc0ef6291 nv_free_system_pages  [nvidia]([kernel.kallsyms])
> > > 
> > > Signed-off-by: Yang Wei <yang.wei@xxxxxxxxxxxxxxxxx>
> > > Tested-by: Yang Wei <yang.wei@xxxxxxxxxxxxxxxxx>
> > > ---
> > >   arch/x86/mm/pageattr.c | 2 ++
> > >   1 file changed, 2 insertions(+)
> > Why is this 4.19-only?
> > 
> > What commit in Linus's tree resolved this issue?
> > 
> > confused,
> > 
> > greg k-h
> 
> We found that the nvidia driver calling
> nv_alloc_system_pages()/nv_free_system_pages()

For obvious reasons, we do not care about this type of problem at all.
Please contact the vendor responsible for this as they are the only ones
who can do anything about it.

good luck!

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux