[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CA+PpKPkAmnVhkwgZU84udJ0BEi+Pd4UOBaJJDVmvd+P=Depbng@mail.gmail.com>
Date: Mon, 28 Sep 2020 22:37:17 +0800
From: Hao Lee <haolee.swjtu@...il.com>
To: npiggin@...il.com
Cc: dan.j.wiilliams@...el.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Can we remove the checking of CONFIG_ARCH_HAS_PTE_SPECIAL in __vm_insert_mixed?
Sorry, the previous email is corrupted. This is a resending.
In the current code, if the architecture supports PTE_SPECIAL,
__vm_insert_mixed() becomes a simple encapsulation of insert_pfn()
because it always calls insert_pfn() and never calls insert_page(). This
behavior is inconsistent with the function's name. As described in commit
423bad600443 ("mm: add vm_insert_mixed"), this function is designed to
supports _both_ raw pfns and pfns with struct page, but in architecture
with PTE_SPECIAL, it treats the latter as the former. So, I think we'd
better remove the checking of CONFIG_ARCH_HAS_PTE_SPECIAL to make the
behavior consistent for all architectures. If my understanding is right,
I can submit a patch to fix this. Thanks.
Regards,
Hao Lee
Powered by blists - more mailing lists