Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445333 > unrolled thread

Re: [PATCH v3 09/17] mm, compaction: make whole_zone flag ignore cached scanner positions

Started byVlastimil Babka <vbabka@suse.cz>
First post2016-07-18 11:20 +0200
Last post2016-07-19 09:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 09/17] mm, compaction: make whole_zone flag ignore  cached scanner positions Vlastimil Babka <vbabka@suse.cz> - 2016-07-18 11:20 +0200
    Re: [PATCH v3 09/17] mm, compaction: make whole_zone flag ignore  cached scanner positions Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-19 08:50 +0200
      Re: [PATCH v3 09/17] mm, compaction: make whole_zone flag ignore  cached scanner positions Vlastimil Babka <vbabka@suse.cz> - 2016-07-19 09:00 +0200

#1445333 — Re: [PATCH v3 09/17] mm, compaction: make whole_zone flag ignore cached scanner positions

FromVlastimil Babka <vbabka@suse.cz>
Date2016-07-18 11:20 +0200
SubjectRe: [PATCH v3 09/17] mm, compaction: make whole_zone flag ignore cached scanner positions
Message-ID<rWcSu-4kE-29@gated-at.bofh.it>
On 07/06/2016 07:09 AM, Joonsoo Kim wrote:
> On Fri, Jun 24, 2016 at 11:54:29AM +0200, Vlastimil Babka wrote:
>> A recent patch has added whole_zone flag that compaction sets when scanning
>> starts from the zone boundary, in order to report that zone has been fully
>> scanned in one attempt. For allocations that want to try really hard or cannot
>> fail, we will want to introduce a mode where scanning whole zone is guaranteed
>> regardless of the cached positions.
>>
>> This patch reuses the whole_zone flag in a way that if it's already passed true
>> to compaction, the cached scanner positions are ignored. Employing this flag
>
> Okay. But, please don't reset cached scanner position even if whole_zone
> flag is set. Just set cc->migrate_pfn and free_pfn, appropriately. With

Won't that result in confusion on cached position updates during 
compaction where it checks the previous cached position? I wonder what 
kinds of corner cases it can bring...

> your following patches, whole_zone could be set without any compaction
> try

I don't understand what you mean here? Even after whole series, 
whole_zone is only checked, and positions thus reset, after passing the 
compaction_suitable() call from compact_zone(). So at that point we can 
say that compaction is being actually tried and it's not a drive-by reset?

Thanks

[toc] | [next] | [standalone]


#1446062

FromJoonsoo Kim <iamjoonsoo.kim@lge.com>
Date2016-07-19 08:50 +0200
Message-ID<rWx0R-BC-7@gated-at.bofh.it>
In reply to#1445333
On Mon, Jul 18, 2016 at 11:12:51AM +0200, Vlastimil Babka wrote:
> On 07/06/2016 07:09 AM, Joonsoo Kim wrote:
> >On Fri, Jun 24, 2016 at 11:54:29AM +0200, Vlastimil Babka wrote:
> >>A recent patch has added whole_zone flag that compaction sets when scanning
> >>starts from the zone boundary, in order to report that zone has been fully
> >>scanned in one attempt. For allocations that want to try really hard or cannot
> >>fail, we will want to introduce a mode where scanning whole zone is guaranteed
> >>regardless of the cached positions.
> >>
> >>This patch reuses the whole_zone flag in a way that if it's already passed true
> >>to compaction, the cached scanner positions are ignored. Employing this flag
> >
> >Okay. But, please don't reset cached scanner position even if whole_zone
> >flag is set. Just set cc->migrate_pfn and free_pfn, appropriately. With
> 
> Won't that result in confusion on cached position updates during
> compaction where it checks the previous cached position? I wonder
> what kinds of corner cases it can bring...

whole_zone would come along with ignore_skip_hint so I think that
there is no problem on cached position updating.

> 
> >your following patches, whole_zone could be set without any compaction
> >try
> 
> I don't understand what you mean here? Even after whole series,
> whole_zone is only checked, and positions thus reset, after passing
> the compaction_suitable() call from compact_zone(). So at that point
> we can say that compaction is being actually tried and it's not a
> drive-by reset?

My point is that we should not initialize zone's cached pfn in case of
the whole_zone because what compaction with COMPACT_PRIO_SYNC_FULL
want is just to scan whole range. zone's cached pfn exists for
efficiency and there is no reason to initialize it by compaction with
COMPACT_PRIO_SYNC_FULL. If there are some parallel compaction users,
they could be benefit from un-initialized zone's cached pfn so I'd
like to leave them.

Thanks.

[toc] | [prev] | [next] | [standalone]


#1446071

FromVlastimil Babka <vbabka@suse.cz>
Date2016-07-19 09:00 +0200
Message-ID<rWxax-FB-3@gated-at.bofh.it>
In reply to#1446062
On 07/19/2016 08:44 AM, Joonsoo Kim wrote:
> On Mon, Jul 18, 2016 at 11:12:51AM +0200, Vlastimil Babka wrote:
>> On 07/06/2016 07:09 AM, Joonsoo Kim wrote:
>>> On Fri, Jun 24, 2016 at 11:54:29AM +0200, Vlastimil Babka wrote:
>>>> A recent patch has added whole_zone flag that compaction sets when scanning
>>>> starts from the zone boundary, in order to report that zone has been fully
>>>> scanned in one attempt. For allocations that want to try really hard or cannot
>>>> fail, we will want to introduce a mode where scanning whole zone is guaranteed
>>>> regardless of the cached positions.
>>>>
>>>> This patch reuses the whole_zone flag in a way that if it's already passed true
>>>> to compaction, the cached scanner positions are ignored. Employing this flag
>>>
>>> Okay. But, please don't reset cached scanner position even if whole_zone
>>> flag is set. Just set cc->migrate_pfn and free_pfn, appropriately. With
>>
>> Won't that result in confusion on cached position updates during
>> compaction where it checks the previous cached position? I wonder
>> what kinds of corner cases it can bring...
>
> whole_zone would come along with ignore_skip_hint so I think that
> there is no problem on cached position updating.

Right, that's true.

>>
>>> your following patches, whole_zone could be set without any compaction
>>> try
>>
>> I don't understand what you mean here? Even after whole series,
>> whole_zone is only checked, and positions thus reset, after passing
>> the compaction_suitable() call from compact_zone(). So at that point
>> we can say that compaction is being actually tried and it's not a
>> drive-by reset?
>
> My point is that we should not initialize zone's cached pfn in case of
> the whole_zone because what compaction with COMPACT_PRIO_SYNC_FULL
> want is just to scan whole range. zone's cached pfn exists for
> efficiency and there is no reason to initialize it by compaction with
> COMPACT_PRIO_SYNC_FULL. If there are some parallel compaction users,
> they could be benefit from un-initialized zone's cached pfn so I'd
> like to leave them.

I doubt they will benefit much, but OK, I'll update the patch.

> Thanks.
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web