On Sat, 16 Sept 2023 at 12:31, Linus Torvalds
<[email protected]> wrote:
>
> Does the attached patch fix the problem?
So while I didn't confirm the fix myself, I'm pretty sure that was it.
Getting the return value wrong would cause an incorrect extra
vm_acct_memory() call in the non-error case when VM_ACCOUNT is set
(and mean the loss of one in the error case, but the error case never
happens in practice).
Which then causes 'vm_committed_as' to grow when it shouldn't, and
causes exactly that "Committed_AS" in /proc/meminfo to be off.
So here's the same patch, but now with a proper commit message etc.
I haven't pushed it out (because it would be lovely to get a
"Tested-by" for it, and that will make the commit ID change), but I'll
probably do so later today, with or without confirmation, because it
does seem to be the problem.
Linus
Greg & Sasha,
can you please queue-up this upstream patch for kernel v6.5-stable ?
commit 3cec50490969afd4a76ccee441f747d869ccff77
Author: Linus Torvalds <[email protected]>
Date: Sat Sep 16 12:31:42 2023 -0700
vm: fix move_vma() memory accounting being off
Thanks,
Helge
On 9/16/23 23:17, Linus Torvalds wrote:
> On Sat, 16 Sept 2023 at 12:31, Linus Torvalds
> <[email protected]> wrote:
>>
>> Does the attached patch fix the problem?
>
> So while I didn't confirm the fix myself, I'm pretty sure that was it.
> Getting the return value wrong would cause an incorrect extra
> vm_acct_memory() call in the non-error case when VM_ACCOUNT is set
> (and mean the loss of one in the error case, but the error case never
> happens in practice).
>
> Which then causes 'vm_committed_as' to grow when it shouldn't, and
> causes exactly that "Committed_AS" in /proc/meminfo to be off.
>
> So here's the same patch, but now with a proper commit message etc.
>
> I haven't pushed it out (because it would be lovely to get a
> "Tested-by" for it, and that will make the commit ID change), but I'll
> probably do so later today, with or without confirmation, because it
> does seem to be the problem.
>
> Linus
On Sun, Sep 17, 2023 at 07:02:50AM +0200, Helge Deller wrote:
> Greg & Sasha,
>
> can you please queue-up this upstream patch for kernel v6.5-stable ?
>
> commit 3cec50490969afd4a76ccee441f747d869ccff77
> Author: Linus Torvalds <[email protected]>
> Date: Sat Sep 16 12:31:42 2023 -0700
>
> vm: fix move_vma() memory accounting being off
Now queued up, thanks.
greg k-h
[
A tad late in the party, I know. The box I had encoutered this isn't
quite on 24/7, and reproduction took some time.
]
Linus Torvalds wrote...
> I haven't pushed it out (because it would be lovely to get a
> "Tested-by" for it, and that will make the commit ID change), but I'll
> probably do so later today, with or without confirmation, because it
> does seem to be the problem.
Confirmed this solves the issue here, too. Tested on 6.6-rc2.
Christoph