lkml.org 
[lkml]   [2021]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] vm_swappiness=0 should still try to avoid swapping anon memory
On Tue, Aug 10, 2021 at 3:16 PM Nico Pache <npache@redhat.com> wrote:
>
>
>
> On 8/10/21 5:17 PM, Shakeel Butt wrote:
> > On Tue, Aug 10, 2021 at 12:24 PM Nico Pache <npache@redhat.com> wrote:
> >>
> >>
> > [...]
> >>>
> >>> I'm wondering how you're getting anon scans with swappiness=0. If you
> >>> look at get_scan_count(), SCAN_FRACT with swappines=0 should always
> >>> result in ap = fraction[0] = 0, which never yields any anon scan
> >>> targets. So I'm thinking you're running into sc->file_is_tiny
> >>> situations, meaning remaining file pages alone are not enough to
> >>> restore watermarks anymore. Is that possible?
> >>
> >> Yes DEACTIVATE_ANON is enabling the file_is_tiny case in shrink_node(). That is what im trying to prevent in the swappiness=0 case.
> >>
> >
> > Can you please explain how DEACTIVATE_ANON is enabling the file_is_tiny case?
>
>
> You're right. Just did a second pass... I misinterpreted the assignment to
> file_is_tiny. This is not the case that is causing the issue. So back to the
> SCAN_FRACT case. From my testing the refaulting still seems to be causing the
> issue; however, to your point in earlier discussions, if swappiness=0 then the
> get_scan_count *should* be 0.
> So my patch does solve the issue by preventing the shrink_list from deactivating
> the anon, but it may be hiding some other issue that is the ultimate cause.
>

Yes, I am suspecting the same. BTW which kernel version are you testing with?

\
 
 \ /
  Last update: 2021-08-11 00:31    [W:0.460 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site