From: Andrew Morton <akpm@linux-foundation.org>
To: stettberger@dokucode.de,stable@vger.kernel.org,khalid.aziz@oracle.com,rppt@linux.ibm.com,akpm@linux-foundation.org,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org
Subject: [patch 06/10] mm/pgtable: define pte_index so that preprocessor could recognize it
Date: Thu, 03 Feb 2022 20:49:29 -0800 [thread overview]
Message-ID: <20220204044929.AB9A2C340E9@smtp.kernel.org> (raw)
In-Reply-To: <20220203204836.88dcebe504f440686cc63a60@linux-foundation.org>
From: Mike Rapoport <rppt@linux.ibm.com>
Subject: mm/pgtable: define pte_index so that preprocessor could recognize it
Since commit 974b9b2c68f3 ("mm: consolidate pte_index() and pte_offset_*()
definitions") pte_index is a static inline and there is no define for it
that can be recognized by the preprocessor. As a result,
vm_insert_pages() uses slower loop over vm_insert_page() instead of
insert_pages() that amortizes the cost of spinlock operations when
inserting multiple pages.
Link: https://lkml.kernel.org/r/20220111145457.20748-1-rppt@kernel.org
Fixes: 974b9b2c68f3 ("mm: consolidate pte_index() and pte_offset_*() definitions")
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reported-by: Christian Dietrich <stettberger@dokucode.de>
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/pgtable.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/linux/pgtable.h~mm-pgtable-define-pte_index-so-that-preprocessor-could-recognize-it
+++ a/include/linux/pgtable.h
@@ -62,6 +62,7 @@ static inline unsigned long pte_index(un
{
return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
}
+#define pte_index pte_index
#ifndef pmd_index
static inline unsigned long pmd_index(unsigned long address)
_
next prev parent reply other threads:[~2022-02-04 4:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 4:48 incoming Andrew Morton
2022-02-04 4:49 ` [patch 01/10] Revert "mm/page_isolation: unset migratetype directly for non Buddy page" Andrew Morton
2022-02-04 4:49 ` [patch 02/10] mm/debug_vm_pgtable: remove pte entry from the page table Andrew Morton
2022-02-04 4:49 ` [patch 03/10] mm/page_table_check: use unsigned long for page counters and cleanup Andrew Morton
2022-02-04 4:49 ` [patch 04/10] mm/khugepaged: unify collapse pmd clear, flush and free Andrew Morton
2022-02-04 4:49 ` [patch 05/10] mm/page_table_check: check entries at pmd levels Andrew Morton
2022-02-04 4:49 ` Andrew Morton [this message]
2022-02-04 4:49 ` [patch 07/10] ipc/sem: do not sleep with a spin lock held Andrew Morton
2022-02-04 4:49 ` [patch 08/10] mm/kmemleak: avoid scanning potential huge holes Andrew Morton
2022-02-04 4:49 ` [patch 09/10] MAINTAINERS: update rppt's email Andrew Morton
2022-02-04 4:49 ` [patch 10/10] kselftest/vm: revert "tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner" Andrew Morton
2022-02-04 17:56 ` [patch 01/10] Revert "mm/page_isolation: unset migratetype directly for non Buddy page" Andrew Morton
2022-02-04 17:56 ` [patch 02/10] mm/debug_vm_pgtable: remove pte entry from the page table Andrew Morton
2022-02-04 17:56 ` [patch 03/10] mm/page_table_check: use unsigned long for page counters and cleanup Andrew Morton
2022-02-04 17:56 ` [patch 04/10] mm/khugepaged: unify collapse pmd clear, flush and free Andrew Morton
2022-02-04 17:56 ` [patch 05/10] mm/page_table_check: check entries at pmd levels Andrew Morton
2022-02-04 17:57 ` [patch 06/10] mm/pgtable: define pte_index so that preprocessor could recognize it Andrew Morton
2022-02-04 17:57 ` [patch 07/10] ipc/sem: do not sleep with a spin lock held Andrew Morton
2022-02-04 17:57 ` [patch 08/10] mm/kmemleak: avoid scanning potential huge holes Andrew Morton
2022-02-04 17:57 ` [patch 09/10] MAINTAINERS: update rppt's email Andrew Morton
2022-02-04 17:57 ` [patch 10/10] kselftest/vm: revert "tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner" Andrew Morton
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=20220204044929.AB9A2C340E9@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=khalid.aziz@oracle.com \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--cc=rppt@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=stettberger@dokucode.de \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).