Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-05 Thread Sergey Fedorov
On 05/07/16 19:00, Alex Bennée wrote: > Sergey Fedorov writes: > >> On 05/07/16 16:42, Paolo Bonzini wrote: >>> On 05/07/2016 15:11, Alex Bennée wrote: Paolo Bonzini writes: > On 05/07/2016 13:14, Alex Bennée wrote: >> /* >> * Patch the last TB with a jump to the current TB

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-05 Thread Alex Bennée
Sergey Fedorov writes: > On 05/07/16 16:42, Paolo Bonzini wrote: >> >> On 05/07/2016 15:11, Alex Bennée wrote: >>> Paolo Bonzini writes: >>> On 05/07/2016 13:14, Alex Bennée wrote: > /* > * Patch the last TB with a jump to the current TB. > * > * Modification of the TB h

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-05 Thread Sergey Fedorov
On 05/07/16 16:42, Paolo Bonzini wrote: > > On 05/07/2016 15:11, Alex Bennée wrote: >> Paolo Bonzini writes: >> >>> On 05/07/2016 13:14, Alex Bennée wrote: /* * Patch the last TB with a jump to the current TB. * * Modification of the TB has to be protected with tb_lock which

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-05 Thread Paolo Bonzini
On 05/07/2016 15:11, Alex Bennée wrote: > > Paolo Bonzini writes: > >> On 05/07/2016 13:14, Alex Bennée wrote: >>> /* >>> * Patch the last TB with a jump to the current TB. >>> * >>> * Modification of the TB has to be protected with tb_lock which can >>> * either be already held or taken h

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-05 Thread Alex Bennée
Paolo Bonzini writes: > On 05/07/2016 13:14, Alex Bennée wrote: >> /* >> * Patch the last TB with a jump to the current TB. >> * >> * Modification of the TB has to be protected with tb_lock which can >> * either be already held or taken here. >> */ >> static inline void maybe_patch_last_tb(

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-05 Thread Paolo Bonzini
On 05/07/2016 13:14, Alex Bennée wrote: > /* > * Patch the last TB with a jump to the current TB. > * > * Modification of the TB has to be protected with tb_lock which can > * either be already held or taken here. > */ > static inline void maybe_patch_last_tb(CPUState *cpu, >

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-05 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Jul 04, 2016 at 12:45:52 +0100, Alex Bennée wrote: >> >> Emilio G. Cota writes: >> >> > On Fri, Jul 01, 2016 at 17:16:10 +0100, Alex Bennée wrote: >> >> Lock contention in the hot path of moving between existing patched >> >> TranslationBlocks is the main drag i

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-04 Thread Emilio G. Cota
On Mon, Jul 04, 2016 at 12:45:52 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > On Fri, Jul 01, 2016 at 17:16:10 +0100, Alex Bennée wrote: > >> Lock contention in the hot path of moving between existing patched > >> TranslationBlocks is the main drag in multithreaded performance. Thi

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-04 Thread Alex Bennée
Emilio G. Cota writes: > On Fri, Jul 01, 2016 at 17:16:10 +0100, Alex Bennée wrote: >> Lock contention in the hot path of moving between existing patched >> TranslationBlocks is the main drag in multithreaded performance. This >> patch pushes the tb_lock() usage down to the two places that reall

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-01 Thread Emilio G. Cota
On Fri, Jul 01, 2016 at 17:16:10 +0100, Alex Bennée wrote: > Lock contention in the hot path of moving between existing patched > TranslationBlocks is the main drag in multithreaded performance. This > patch pushes the tb_lock() usage down to the two places that really need > it: > > - code gene

Re: [Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-01 Thread Richard Henderson
On 07/01/2016 09:16 AM, Alex Bennée wrote: Lock contention in the hot path of moving between existing patched TranslationBlocks is the main drag in multithreaded performance. This patch pushes the tb_lock() usage down to the two places that really need it: - code generation (tb_gen_code) - j

[Qemu-devel] [PATCH 2/2] cpu-exec: remove tb_lock from the hot-path

2016-07-01 Thread Alex Bennée
Lock contention in the hot path of moving between existing patched TranslationBlocks is the main drag in multithreaded performance. This patch pushes the tb_lock() usage down to the two places that really need it: - code generation (tb_gen_code) - jump patching (tb_add_jump) The rest of the c