NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/52184: Recent qemu performs badly on NetBSD hosts under load



The following reply was made to PR misc/52184; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: misc/52184: Recent qemu performs badly on NetBSD hosts under load
Date: Fri, 21 Apr 2017 12:00:20 +0200

 On Fri, Apr 21, 2017 at 09:40:00AM +0000, Andreas Gustafsson wrote:
 > Reading the diff of the commit in case did not make it immediately
 > clear to me why this should cause a performance regression on NetBSD.
 > Any help in explaining this is appreciated.
 
 We should probably investigate what atomic_xchg() actually expands to:
 
 +void aio_notify_accept(AioContext *ctx)
 +{
 +    if (atomic_xchg(&ctx->notified, false)) {
 +        event_notifier_test_and_clear(&ctx->notifier);
      }
 
 ctx->notified is a boolean, so I guess __atomic_exchange_1().
 For testing, it might be interesting to align it on a cache line boundary
 or make it a 32bit value.
 
 It may also be a compiler issue, can you test a qemu compiled with a newer
 gcc, or even repeat the test in NetBSD -current?
 
 Martin
 


Home | Main Index | Thread Index | Old Index