From: "David Wang" <00107082@163.com>
To: "Suren Baghdasaryan" <surenb@google.com>
Cc: kent.overstreet@linux.dev, linux-kernel@vger.kernel.org,
yuzhao@google.com
Subject: Re: Abnormal values show up in /proc/allocinfo
Date: Wed, 27 Nov 2024 17:44:26 +0800 (CST) [thread overview]
Message-ID: <1801415b.a202.1936d01f953.Coremail.00107082@163.com> (raw)
In-Reply-To: <CAJuCfpHZhMwK8jOz_evvvD8CaNxxaaRQEx0Qv_yPp4ZA_DkXeg@mail.gmail.com>
At 2024-11-27 01:10:23, "Suren Baghdasaryan" <surenb@google.com> wrote:
>
>Hi David,
>Thanks for the investigation. I think your suggestion should work fine
>and it's simpler than what we do now. It will swap not only counters
>but allocation locations as well, however I think we already do that
>when we call __alloc_tag_ref_set(). So, instead of clearing the
>original tag, decrementing the new tag's counter (to compensate for
>its own allocation) and reassigning the old tag to the new counter,
>you simply swap the tags. That seems fine to me.
>However I think there is still a bug where some get_new_folio()
>callback does not increment the new folio's counters and that's why we
>get an underflow when calling alloc_tag_sub(). I'll try to reproduce
>on my side and see what's going on there.
Agreed, the reason for underflow with current code should be clarified.
Just update reproduce procedure:
1. fio --randrepeat=1 --ioengine=libaio --direct=1 --name=test --bs=4k --iodepth=64 --size=1G --readwrite=randrw --runtime=100 --numjobs=4 --time_based=1
2. echo 1 >/proc/sys/vm/compact_memory
3. echo 1 > /proc/sys/vm/drop_caches
(It is very strange, on my VM, "echo 3 > /proc/sys/vm/drop_caches" would not trigger easily.
4 cat /proc/allocinfo | grep __filemap_get_folio
FYI
David
>Thanks,
>Suren.
>
>>
>> static void shutdown_mem_profiling(bool remove_file)
>>
>>
>>
>> FYI
>> David
>>
>>
>> >
>> >Thanks~
>> >David
>> >
>> >>
>> >>> > >Thanks,
>> >>> > >Suren.
>> >>> > >
>> >>> > >>
>> >>> > >>
>> >>> > >> Thanks
>> >>> > >> David
>> >>> > >>
>> >>> > >>
>> >>> > >>
>> >>> > >>
next prev parent reply other threads:[~2024-11-27 9:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 7:43 Abnormal values show up in /proc/allocinfo David Wang
2024-11-25 0:35 ` Suren Baghdasaryan
2024-11-25 1:01 ` David Wang
2024-11-25 10:09 ` David Wang
2024-11-25 17:31 ` Suren Baghdasaryan
2024-11-25 20:31 ` Suren Baghdasaryan
2024-11-26 1:14 ` David Wang
2024-11-26 7:16 ` David Wang
2024-11-26 17:10 ` Suren Baghdasaryan
2024-11-27 9:44 ` David Wang [this message]
2024-11-28 8:34 ` David Wang
2024-11-28 18:46 ` Suren Baghdasaryan
2024-11-28 19:58 ` Suren Baghdasaryan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1801415b.a202.1936d01f953.Coremail.00107082@163.com \
--to=00107082@163.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=surenb@google.com \
--cc=yuzhao@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox