Messages in this thread | | | Date | Tue, 1 Feb 2022 18:17:34 +0100 | From | Sebastian Andrzej Siewior <> | Subject | Re: [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
| |