[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/7] aio-posix: move RCU_READ_LOCK() into run_poll_handlers()
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 2/7] aio-posix: move RCU_READ_LOCK() into run_poll_handlers() |
Date: |
Fri, 6 Mar 2020 13:43:41 +0000 |
On Thu, Mar 05, 2020 at 06:15:36PM +0100, Paolo Bonzini wrote:
> On 05/03/20 18:08, Stefan Hajnoczi wrote:
> >
> > + /*
> > + * Optimization: ->io_poll() handlers often contain RCU read critical
> > + * sections and we therefore see many rcu_read_lock() ->
> > rcu_read_unlock()
> > + * -> rcu_read_lock() -> ... sequences with expensive memory
> > + * synchronization primitives. Make the entire polling loop an RCU
> > + * critical section because nested rcu_read_lock()/rcu_read_unlock()
> > calls
> > + * are cheap.
> > + */
> > + RCU_READ_LOCK_GUARD();
> > +
>
> Looks good, but I suggest that you compile with --enable-membarrier as
> that makes RCU critical sections basically free.
Interesting, --enable-membarrier decreases performance from 105k to 97k
IOPS in the NVMe latency benchmark that I'm running.
Stefan
signature.asc
Description: PGP signature
- [PATCH 0/7] aio-posix: polling scalability improvements, Stefan Hajnoczi, 2020/03/05
- [PATCH 2/7] aio-posix: move RCU_READ_LOCK() into run_poll_handlers(), Stefan Hajnoczi, 2020/03/05
- [PATCH 1/7] aio-posix: completely stop polling when disabled, Stefan Hajnoczi, 2020/03/05
- [PATCH 4/7] aio-posix: simplify FDMonOps->update() prototype, Stefan Hajnoczi, 2020/03/05
- [PATCH 3/7] aio-posix: extract ppoll(2) and epoll(7) fd monitoring, Stefan Hajnoczi, 2020/03/05
- [PATCH 7/7] aio-posix: remove idle poll handlers to improve scalability, Stefan Hajnoczi, 2020/03/05
[PATCH 6/7] aio-posix: support userspace polling of fd monitoring, Stefan Hajnoczi, 2020/03/05
[PATCH 5/7] aio-posix: add io_uring fd monitoring implementation, Stefan Hajnoczi, 2020/03/05