* [Qemu-devel] [PULL v2 00/12] RCU, scsi, modules, icount changes for 2015-01-30
@ 2015-02-02 16:29 Paolo Bonzini
2015-02-02 17:54 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2015-02-02 16:29 UTC (permalink / raw)
To: qemu-devel
The following changes since commit 83761b9244ad2ed39d3cfabe8a0e901ab906f7bf:
Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20150127' into staging (2015-01-27 22:25:56 +0000)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 42b5c7a09801805278e5ac40c0ccaf137981ecb6:
configure: Default to enable module build (2015-02-02 16:55:11 +0100)
----------------------------------------------------------------
The important bits here are the first part of RCU and enabling
modules by default. They have been tested with Travis for a few
days now, and things seem okay.
v1->v2 changes are the new qemu-thread patch to fix Mac OS X,
and cleaning up warnings.
----------------------------------------------------------------
Fam Zheng (2):
scsi: Fix scsi_req_cancel_async for no aiocb req
configure: Default to enable module build
Jan Kiszka (1):
memory: remove assertion on memory_region_destroy
Paolo Bonzini (9):
qemu-thread: fix qemu_event without futexes
rcu: add rcu library
rcu: add rcutorture
rcu: allow nesting of rcu_read_lock/rcu_read_unlock
rcu: add call_rcu
memory: protect current_map by RCU
memory: avoid ref/unref in memory_region_find
cpu-exec: simplify align_clocks
cpu-exec: simplify init_delay_params
.travis.yml | 2 +-
configure | 95 +++++++---
cpu-exec.c | 9 +-
cpus.c | 17 --
docs/rcu.txt | 387 +++++++++++++++++++++++++++++++++++++++
hw/9pfs/virtio-9p-synth.c | 1 +
hw/scsi/scsi-bus.c | 2 +
include/exec/memory.h | 5 +
include/qemu/atomic.h | 61 +++++++
include/qemu/queue.h | 13 ++
include/qemu/rcu.h | 147 +++++++++++++++
include/qemu/thread.h | 3 -
include/qemu/timer.h | 1 -
memory.c | 65 +++----
tests/Makefile | 7 +-
tests/rcutorture.c | 451 ++++++++++++++++++++++++++++++++++++++++++++++
util/Makefile.objs | 1 +
util/qemu-thread-posix.c | 2 +
util/rcu.c | 291 ++++++++++++++++++++++++++++++
19 files changed, 1465 insertions(+), 95 deletions(-)
create mode 100644 docs/rcu.txt
create mode 100644 include/qemu/rcu.h
create mode 100644 tests/rcutorture.c
create mode 100644 util/rcu.c
--
1.8.3.1
diff --git a/configure b/configure
index 2c3a444..a9ae57a 100755
--- a/configure
+++ b/configure
@@ -2733,8 +2733,8 @@ fi
glib_pkg_config()
{
if $pkg_config --atleast-version=$glib_req_ver $1; then
- local probe_cflags=$($pkg_config --cflags $1)
- local probe_libs=$($pkg_config --libs $1)
+ local probe_cflags="$($pkg_config --cflags $1)"
+ local probe_libs="$($pkg_config --libs $1)"
CFLAGS="$probe_cflags $CFLAGS"
LIBS="$probe_libs $LIBS"
libs_qga="$probe_libs $libs_qga"
diff --git a/tests/rcutorture.c b/tests/rcutorture.c
index 93ec1b3..60a2ccf 100644
--- a/tests/rcutorture.c
+++ b/tests/rcutorture.c
@@ -168,7 +168,7 @@ static void perftestrun(int nthreads, int duration, int nreaders, int nupdaters)
g_usleep(1000);
}
goflag = GOFLAG_RUN;
- sleep(duration);
+ g_usleep(duration * G_USEC_PER_SEC);
goflag = GOFLAG_STOP;
wait_all_threads();
printf("n_reads: %lld n_updates: %ld nreaders: %d nupdaters: %d duration: %d\n",
@@ -241,7 +241,7 @@ static void *rcu_read_stress_test(void *arg)
struct rcu_stress *p;
int pc;
long long n_reads_local = 0;
- volatile int garbage;
+ volatile int garbage = 0;
rcu_register_thread();
@@ -300,10 +300,11 @@ static void *rcu_update_stress_test(void *arg)
p->mbtest = 1;
atomic_rcu_set(&rcu_stress_current, p);
rcu_stress_idx = i;
- for (i = 0; i < RCU_STRESS_PIPE_LEN; i++)
+ for (i = 0; i < RCU_STRESS_PIPE_LEN; i++) {
if (i != rcu_stress_idx) {
rcu_stress_array[i].pipe_count++;
}
+ }
synchronize_rcu();
n_updates++;
}
@@ -344,7 +345,7 @@ static void stresstest(int nreaders, int duration)
create_thread(rcu_fake_update_stress_test);
}
goflag = GOFLAG_RUN;
- sleep(duration);
+ g_usleep(duration * G_USEC_PER_SEC);
goflag = GOFLAG_STOP;
wait_all_threads();
printf("n_reads: %lld n_updates: %ld n_mberror: %d\n",
@@ -374,7 +375,7 @@ static void gtest_stress(int nreaders, int duration)
create_thread(rcu_fake_update_stress_test);
}
goflag = GOFLAG_RUN;
- sleep(duration);
+ g_usleep(duration * G_USEC_PER_SEC);
goflag = GOFLAG_STOP;
wait_all_threads();
g_assert_cmpint(n_mberror, ==, 0);
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
index 41cb23d..50a29d8 100644
--- a/util/qemu-thread-posix.c
+++ b/util/qemu-thread-posix.c
@@ -307,11 +307,13 @@ static inline void futex_wait(QemuEvent *ev, unsigned val)
#else
static inline void futex_wake(QemuEvent *ev, int n)
{
+ pthread_mutex_lock(&ev->lock);
if (n == 1) {
pthread_cond_signal(&ev->cond);
} else {
pthread_cond_broadcast(&ev->cond);
}
+ pthread_mutex_unlock(&ev->lock);
}
static inline void futex_wait(QemuEvent *ev, unsigned val)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL v2 00/12] RCU, scsi, modules, icount changes for 2015-01-30
2015-02-02 16:29 [Qemu-devel] [PULL v2 00/12] RCU, scsi, modules, icount changes for 2015-01-30 Paolo Bonzini
@ 2015-02-02 17:54 ` Peter Maydell
2015-02-02 18:16 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2015-02-02 17:54 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU Developers
On 2 February 2015 at 16:29, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The important bits here are the first part of RCU and enabling
> modules by default. They have been tested with Travis for a few
> days now, and things seem okay.
>
> v1->v2 changes are the new qemu-thread patch to fix Mac OS X,
> and cleaning up warnings.
More build failures, I'm afraid:
Tools all fail to link in a static build:
(exec '../../configure' '--cc=ccache gcc' '--enable-debug' '--static'
'--disable-system')
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o):
In function `g_get_user_database_entry':
(.text+0x245): warning: Using 'getpwuid' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o):
In function `g_get_user_database_entry':
(.text+0xa4): warning: Using 'getpwnam_r' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o):
In function `g_get_user_database_entry':
(.text+0xdb): warning: Using 'getpwuid_r' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer
equality in `/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libc.a(strcmp.o)'
cannot be used when making an executable; recompile with -fPIE and
relink with -pie
collect2: error: ld returned 1 exit status
make: *** [qemu-bridge-helper] Error 1
Module linking fails on ARM host:
LINK block/curl.so
/usr/bin/ld: block/curl.o: relocation R_ARM_THM_MOVW_ABS_NC against
`__stack_chk_guard' can not be used when making a shared object;
recompile with -fPIC
block/curl.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL v2 00/12] RCU, scsi, modules, icount changes for 2015-01-30
2015-02-02 17:54 ` Peter Maydell
@ 2015-02-02 18:16 ` Paolo Bonzini
2015-02-02 18:24 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2015-02-02 18:16 UTC (permalink / raw)
To: Peter Maydell; +Cc: Fam Zheng, QEMU Developers
On 02/02/2015 18:54, Peter Maydell wrote:
> On 2 February 2015 at 16:29, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> The important bits here are the first part of RCU and enabling
>> modules by default. They have been tested with Travis for a few
>> days now, and things seem okay.
>>
>> v1->v2 changes are the new qemu-thread patch to fix Mac OS X,
>> and cleaning up warnings.
>
> More build failures, I'm afraid:
Can you merge up to commit 2aeba9d8a1b6121b98948fcd42fd2aa32f68b750 only
or should I respin without the final patch?
Paolo
> Tools all fail to link in a static build:
> (exec '../../configure' '--cc=ccache gcc' '--enable-debug' '--static'
> '--disable-system')
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o):
> In function `g_get_user_database_entry':
> (.text+0x245): warning: Using 'getpwuid' in statically linked
> applications requires at runtime the shared libraries from the glibc
> version used for linking
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o):
> In function `g_get_user_database_entry':
> (.text+0xa4): warning: Using 'getpwnam_r' in statically linked
> applications requires at runtime the shared libraries from the glibc
> version used for linking
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o):
> In function `g_get_user_database_entry':
> (.text+0xdb): warning: Using 'getpwuid_r' in statically linked
> applications requires at runtime the shared libraries from the glibc
> version used for linking
> /usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer
> equality in `/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libc.a(strcmp.o)'
> cannot be used when making an executable; recompile with -fPIE and
> relink with -pie
> collect2: error: ld returned 1 exit status
> make: *** [qemu-bridge-helper] Error 1
>
> Module linking fails on ARM host:
> LINK block/curl.so
> /usr/bin/ld: block/curl.o: relocation R_ARM_THM_MOVW_ABS_NC against
> `__stack_chk_guard' can not be used when making a shared object;
> recompile with -fPIC
> block/curl.o: could not read symbols: Bad value
> collect2: error: ld returned 1 exit status
>
> -- PMM
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL v2 00/12] RCU, scsi, modules, icount changes for 2015-01-30
2015-02-02 18:16 ` Paolo Bonzini
@ 2015-02-02 18:24 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-02-02 18:24 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Fam Zheng, QEMU Developers
On 2 February 2015 at 18:16, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Can you merge up to commit 2aeba9d8a1b6121b98948fcd42fd2aa32f68b750 only
> or should I respin without the final patch?
My pullreq-application script doesn't like merging things which
aren't branches or tags, I'm afraid. Can you respin?
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-02 18:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 16:29 [Qemu-devel] [PULL v2 00/12] RCU, scsi, modules, icount changes for 2015-01-30 Paolo Bonzini
2015-02-02 17:54 ` Peter Maydell
2015-02-02 18:16 ` Paolo Bonzini
2015-02-02 18:24 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.