lkml.org 
[lkml]   [2022]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 00/35] Speculative page faults
    On 2022-01-31 17:14:34 [-0800], Andrew Morton wrote:
    > On Fri, 28 Jan 2022 05:09:31 -0800 Michel Lespinasse <michel@lespinasse.org> wrote:
    > > The next step is to walk down the existing page table tree to find the
    > > current pte entry. This is done with interrupts disabled to avoid
    > > races with munmap().
    >
    > Sebastian, could you please comment on this from the CONFIG_PREEMPT_RT
    > point of view?

    I applied the series on top of RT and gave it shot. Nothing out of the
    ordinary happened so that is good.

    From browsing through the code:
    - speculative_page_walk_begin() seems to disable interrupts.
    There is a spin_trylock() invocation in that area. That is okay since
    it is never invoked from in_IRQ(). But there should not be any regular
    spin_lock() in such a section.

    - We do have a seqcount API. So instead of mmap_seq_read_start() one
    could use raw_read_seqcount(). The lockdep bits would also check if
    the associated lock (in this case mmap_lock) is held in the write
    path.

    - The read side (mmap_seq_read_start()) does not attempt to stabilize
    the counter (waiting for even) which is good. Otherwise special care
    would be needed ;)

    Sebastian

    \
     
     \ /
      Last update: 2022-02-01 18:18    [W:2.226 / U:0.676 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site