From: Jiaqi Yan <jiaqiyan@google.com>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: muchun.song@linux.dev, akpm@linux-foundation.org,
shuah@kernel.org, corbet@lwn.net, osalvador@suse.de,
rientjes@google.com, duenwen@google.com, fvdl@google.com,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org, nao.horiguchi@gmail.com,
jane.chu@oracle.com, ioworker0@gmail.com
Subject: Re: [PATCH v5 1/4] mm/memory-failure: refactor log format in soft offline code
Date: Tue, 25 Jun 2024 08:48:46 -0700 [thread overview]
Message-ID: <CACw3F53H96xws-ZHacWFbDt=YjaKiGYKRMwLJkUe+pUPGy_M=A@mail.gmail.com> (raw)
In-Reply-To: <b669e378-45cb-981e-ba58-1e3c4943577d@huawei.com>
On Mon, Jun 24, 2024 at 11:41 PM Miaohe Lin <linmiaohe@huawei.com> wrote:
>
> On 2024/6/25 0:33, Jiaqi Yan wrote:
> > Logs from soft_offline_page and soft_offline_in_use_page have
> > different formats than majority of the memory failure code:
> >
> > "Memory failure: 0x${pfn}: ${lower_case_message}"
> >
> > Convert them to the following format:
> >
> > "Soft offline: 0x${pfn}: ${lower_case_message}"
> >
> > No functional change in this commit.
> >
> > Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
> > ---
> > mm/memory-failure.c | 15 +++++++++------
> > 1 file changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> > index d3c830e817e3..2a097af7da0e 100644
> > --- a/mm/memory-failure.c
> > +++ b/mm/memory-failure.c
> > @@ -2631,6 +2631,9 @@ int unpoison_memory(unsigned long pfn)
> > }
> > EXPORT_SYMBOL(unpoison_memory);
> >
> > +#undef pr_fmt
> > +#define pr_fmt(fmt) "Soft offline: " fmt
> > +
> > static bool mf_isolate_folio(struct folio *folio, struct list_head *pagelist)
> > {
> > bool isolated = false;
> > @@ -2686,7 +2689,7 @@ static int soft_offline_in_use_page(struct page *page)
> >
> > if (!huge && folio_test_large(folio)) {
> > if (try_to_split_thp_page(page)) {
> > - pr_info("soft offline: %#lx: thp split failed\n", pfn);
> > + pr_info("%#lx: thp split failed\n", pfn);
> > return -EBUSY;
> > }
> > folio = page_folio(page);
> > @@ -2698,7 +2701,7 @@ static int soft_offline_in_use_page(struct page *page)
> > if (PageHWPoison(page)) {
> > folio_unlock(folio);
> > folio_put(folio);
> > - pr_info("soft offline: %#lx page already poisoned\n", pfn);
> > + pr_info("%#lx page already poisoned\n", pfn);
>
> Again, it's better to be "%#lx: page" to make log format consistent.
Ah, I missed a ":", thanks for catching this!
> Thanks.
> .
next prev parent reply other threads:[~2024-06-25 15:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 16:33 [PATCH v5 0/4] Userspace controls soft-offline pages Jiaqi Yan
2024-06-24 16:33 ` [PATCH v5 1/4] mm/memory-failure: refactor log format in soft offline code Jiaqi Yan
2024-06-25 6:40 ` Miaohe Lin
2024-06-25 15:48 ` Jiaqi Yan [this message]
2024-06-24 16:33 ` [PATCH v5 2/4] mm/memory-failure: userspace controls soft-offlining pages Jiaqi Yan
2024-06-24 16:33 ` [PATCH v5 3/4] selftest/mm: test enable_soft_offline behaviors Jiaqi Yan
2024-06-25 7:05 ` Miaohe Lin
[not found] ` <CACw3F51yApRGaKcKmeEo-SYbt-nxULCwe2imCnsaPP8m4UBW6g@mail.gmail.com>
2024-06-26 1:54 ` Miaohe Lin
2024-06-26 3:57 ` Jiaqi Yan
2024-06-24 16:33 ` [PATCH v5 4/4] docs: mm: add enable_soft_offline sysctl Jiaqi Yan
2024-06-25 7:16 ` Miaohe Lin
2024-06-26 0:02 ` Randy Dunlap
2024-06-26 0:18 ` Jiaqi Yan
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='CACw3F53H96xws-ZHacWFbDt=YjaKiGYKRMwLJkUe+pUPGy_M=A@mail.gmail.com' \
--to=jiaqiyan@google.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=duenwen@google.com \
--cc=fvdl@google.com \
--cc=ioworker0@gmail.com \
--cc=jane.chu@oracle.com \
--cc=linmiaohe@huawei.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=nao.horiguchi@gmail.com \
--cc=osalvador@suse.de \
--cc=rientjes@google.com \
--cc=shuah@kernel.org \
/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