• Muhammad Usama Anjum's avatar
    fs/proc/task_mmu: add fast paths to get/clear PAGE_IS_WRITTEN flag · 12f6b01a
    Muhammad Usama Anjum authored
    Adding fast code paths to handle specifically only get and/or clear
    operation of PAGE_IS_WRITTEN, increases its performance by 0-35%.  The
    results of some test cases are given below:
    
    Test-case-1
    t1 = (Get + WP) time
    t2 = WP time
                           t1            t2
    Without this patch:    140-170mcs    90-115mcs
    With this patch:       110mcs        80mcs
    Worst case diff:       35% faster    30% faster
    
    Test-case-2
    t3 = atomic Get and WP
                          t3
    Without this patch:   120-140mcs
    With this patch:      100-110mcs
    Worst case diff:      21% faster
    
    Link: https://lkml.kernel.org/r/20230821141518.870589-4-usama.anjum@collabora.comSigned-off-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
    Cc: Alex Sierra <alex.sierra@amd.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andrei Vagin <avagin@gmail.com>
    Cc: Axel Rasmussen <axelrasmussen@google.com>
    Cc: Christian Brauner <brauner@kernel.org>
    Cc: Cyrill Gorcunov <gorcunov@gmail.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
    Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Michal Miroslaw <emmir@google.com>
    Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
    Cc: Mike Rapoport (IBM) <rppt@kernel.org>
    Cc: Nadav Amit <namit@vmware.com>
    Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
    Cc: Paul Gofman <pgofman@codeweavers.com>
    Cc: Peter Xu <peterx@redhat.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Yang Shi <shy828301@gmail.com>
    Cc: Yun Zhou <yun.zhou@windriver.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    12f6b01a
task_mmu.c 66.6 KB