Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1574665
| From | vinayak menon <vinayakm.list@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow |
| Date | 2017-02-06 14:10 +0100 |
| Message-ID | <t7Rdo-5m6-33@gated-at.bofh.it> (permalink) |
| References | <t7QAF-4T3-15@gated-at.bofh.it> <t7QAG-4T3-25@gated-at.bofh.it> <t7QU2-4ZM-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Feb 6, 2017 at 6:10 PM, Michal Hocko <mhocko@kernel.org> wrote:
> On Mon 06-02-17 17:54:10, Vinayak Menon wrote:
> [...]
>> diff --git a/mm/vmpressure.c b/mm/vmpressure.c
>> index 149fdf6..3281b34 100644
>> --- a/mm/vmpressure.c
>> +++ b/mm/vmpressure.c
>> @@ -112,8 +112,10 @@ static enum vmpressure_levels vmpressure_calc_level(unsigned long scanned,
>> unsigned long reclaimed)
>> {
>> unsigned long scale = scanned + reclaimed;
>> - unsigned long pressure;
>> + unsigned long pressure = 0;
>>
>> + if (reclaimed >= scanned)
>> + goto out;
>
> This deserves a comment IMHO. Besides that, why shouldn't we normalize
> the result already in vmpressure()? Please note that the tree == true
> path will aggregate both scanned and reclaimed and that already skews
> numbers.
Sure. Will add a comment.
IIUC, normalizing in vmpressure() means something like this which you
mentioned in one
of your previous emails right ?
+ if (reclaimed > scanned)
+ reclaimed = scanned;
Considering a scan window of 512 pages and without above piece of
code, if the first scanning is of a THP page
Scan=1,Reclaimed=512
If the next 511 scans results in 0 reclaimed pages
total_scan=512,Reclaimed=512 => vmpressure 0
Now with the above piece of code in place
Scan=1,Reclaimed=1, then
Scan=511, Reclaimed=0
total_scan=512,Reclaimed=1 => critical vmpressure
With the slab issue fixed separately, we need to fix only the
underflow right ? And if we do it in vmpressure_calc_level,
the check needs to done only once at the end of a scan window.
Thanks,
Vinayak
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure Vinayak Menon <vinmenon@codeaurora.org> - 2017-02-06 13:30 +0100
[PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow Vinayak Menon <vinmenon@codeaurora.org> - 2017-02-06 13:30 +0100
Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow Michal Hocko <mhocko@kernel.org> - 2017-02-06 13:50 +0100
Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow vinayak menon <vinayakm.list@gmail.com> - 2017-02-06 14:10 +0100
Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow Michal Hocko <mhocko@kernel.org> - 2017-02-06 14:30 +0100
Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow vinayak menon <vinayakm.list@gmail.com> - 2017-02-06 15:40 +0100
Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow Michal Hocko <mhocko@kernel.org> - 2017-02-06 16:20 +0100
Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow vinayak menon <vinayakm.list@gmail.com> - 2017-02-07 12:20 +0100
Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow Michal Hocko <mhocko@kernel.org> - 2017-02-07 13:20 +0100
Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure Michal Hocko <mhocko@kernel.org> - 2017-02-06 14:00 +0100
Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure vinayak menon <vinayakm.list@gmail.com> - 2017-02-06 16:20 +0100
Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure Michal Hocko <mhocko@kernel.org> - 2017-02-07 09:20 +0100
Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure vinayak menon <vinayakm.list@gmail.com> - 2017-02-07 12:10 +0100
Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure Michal Hocko <mhocko@kernel.org> - 2017-02-07 13:20 +0100
Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure vinayak menon <vinayakm.list@gmail.com> - 2017-02-07 14:20 +0100
Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure Michal Hocko <mhocko@kernel.org> - 2017-02-07 16:00 +0100
csiph-web