Re: a question of split_huge_page

2020-07-10 Thread Yang Shi
On Fri, Jul 10, 2020 at 2:35 AM Alex Shi wrote: > > 在 2020/7/10 下午1:28, Mika Penttilä 写道: > > > > > > On 10.7.2020 7.51, Alex Shi wrote: > >> > >> 在 2020/7/10 上午12:07, Kirill A. Shutemov 写道: > >>> On Thu, Jul 09, 2020 at 04:50:02PM +0100, Matthew Wilcox wrote: > On Thu, Jul 09, 2020 at 11:11:

Re: a question of split_huge_page

2020-07-10 Thread Alex Shi
在 2020/7/10 下午6:33, Kirill A. Shutemov 写道: > On Fri, Jul 10, 2020 at 12:51:58PM +0800, Alex Shi wrote: >> >> >> 在 2020/7/10 上午12:07, Kirill A. Shutemov 写道: >>> Right, and it's never got removed from LRU during the split. The tail >>> pages have to be added to LRU because they now separate from t

Re: a question of split_huge_page

2020-07-10 Thread Joerg Roedel
Adding Robin. On Fri, Jul 10, 2020 at 05:34:52PM +0800, Alex Shi wrote: > 在 2020/7/10 下午1:28, Mika Penttilä 写道: > > > > > > On 10.7.2020 7.51, Alex Shi wrote: > >> > >> 在 2020/7/10 上午12:07, Kirill A. Shutemov 写道: > >>> On Thu, Jul 09, 2020 at 04:50:02PM +0100, Matthew Wilcox wrote: > On Thu

Re: a question of split_huge_page

2020-07-10 Thread Kirill A. Shutemov
On Fri, Jul 10, 2020 at 12:51:58PM +0800, Alex Shi wrote: > > > 在 2020/7/10 上午12:07, Kirill A. Shutemov 写道: > > Right, and it's never got removed from LRU during the split. The tail > > pages have to be added to LRU because they now separate from the tail > > page. > > > According to the explain

Re: a question of split_huge_page

2020-07-10 Thread Alex Shi
在 2020/7/10 下午1:28, Mika Penttilä 写道: > > > On 10.7.2020 7.51, Alex Shi wrote: >> >> 在 2020/7/10 上午12:07, Kirill A. Shutemov 写道: >>> On Thu, Jul 09, 2020 at 04:50:02PM +0100, Matthew Wilcox wrote: On Thu, Jul 09, 2020 at 11:11:11PM +0800, Alex Shi wrote: > Hi Kirill & Matthew, >

Re: a question of split_huge_page

2020-07-10 Thread Mika Penttilä
On 10.7.2020 10.00, Alex Shi wrote: > > 在 2020/7/10 下午1:28, Mika Penttilä 写道: >>> Thanks a lot for quick reply! >>> What I am confusing is the call chain: __iommu_dma_alloc_pages() >>> to split_huge_page(), in the func, splited page, >>> page = alloc_pages_node(nid, alloc_flags, order); >>> A

Re: a question of split_huge_page

2020-07-10 Thread Alex Shi
在 2020/7/10 下午1:28, Mika Penttilä 写道: >> Thanks a lot for quick reply! >> What I am confusing is the call chain: __iommu_dma_alloc_pages() >> to split_huge_page(), in the func, splited page, >> page = alloc_pages_node(nid, alloc_flags, order); >> And if the pages were added into lru, they m

Re: a question of split_huge_page

2020-07-09 Thread Mika Penttilä
On 10.7.2020 7.51, Alex Shi wrote: > > 在 2020/7/10 上午12:07, Kirill A. Shutemov 写道: >> On Thu, Jul 09, 2020 at 04:50:02PM +0100, Matthew Wilcox wrote: >>> On Thu, Jul 09, 2020 at 11:11:11PM +0800, Alex Shi wrote: Hi Kirill & Matthew, In the func call chain, from split_huge_page() to

Re: a question of split_huge_page

2020-07-09 Thread Alex Shi
在 2020/7/10 上午12:07, Kirill A. Shutemov 写道: > On Thu, Jul 09, 2020 at 04:50:02PM +0100, Matthew Wilcox wrote: >> On Thu, Jul 09, 2020 at 11:11:11PM +0800, Alex Shi wrote: >>> Hi Kirill & Matthew, >>> >>> In the func call chain, from split_huge_page() to lru_add_page_tail(), >>> Seems tail pages

Re: a question of split_huge_page

2020-07-09 Thread Kirill A. Shutemov
On Thu, Jul 09, 2020 at 04:50:02PM +0100, Matthew Wilcox wrote: > On Thu, Jul 09, 2020 at 11:11:11PM +0800, Alex Shi wrote: > > Hi Kirill & Matthew, > > > > In the func call chain, from split_huge_page() to lru_add_page_tail(), > > Seems tail pages are added to lru list at line 963, but in this sc

Re: a question of split_huge_page

2020-07-09 Thread Matthew Wilcox
On Thu, Jul 09, 2020 at 11:11:11PM +0800, Alex Shi wrote: > Hi Kirill & Matthew, > > In the func call chain, from split_huge_page() to lru_add_page_tail(), > Seems tail pages are added to lru list at line 963, but in this scenario > the head page has no lru bit and isn't set the bit later. Why we

a question of split_huge_page

2020-07-09 Thread Alex Shi
Hi Kirill & Matthew, In the func call chain, from split_huge_page() to lru_add_page_tail(), Seems tail pages are added to lru list at line 963, but in this scenario the head page has no lru bit and isn't set the bit later. Why we do this? or do I miss sth? Many Thanks Alex 938 void lru_add_page