From 4d85011a516005eb0441f1538d82370819fbac9a Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 25 Feb 2014 11:12:41 +0000 Subject: [PATCH] disable sequential skipahead this was causing some problems on very-many-core systems still need to update operation flags and disable seq mode for insert/extract/etc. --- libvips/conversion/sequential.c | 4 ++-- libvips/foreign/jpeg2vips.c | 4 ++-- libvips/iofuncs/sinkmemory.c | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libvips/conversion/sequential.c b/libvips/conversion/sequential.c index 3483d1db..5f6def82 100644 --- a/libvips/conversion/sequential.c +++ b/libvips/conversion/sequential.c @@ -144,8 +144,8 @@ vips_sequential_generate( VipsRegion *or, return( -1 ); } - if( r->top > sequential->y_pos && - sequential->y_pos > 0 ) { + if( r->top > sequential->y_pos /* && + sequential->y_pos > 0 */ ) { /* We have started reading (y_pos > 0) and this request is for * stuff beyond that, stall for a while to give other * threads time to catch up. diff --git a/libvips/foreign/jpeg2vips.c b/libvips/foreign/jpeg2vips.c index 19c946fc..b2f7e562 100644 --- a/libvips/foreign/jpeg2vips.c +++ b/libvips/foreign/jpeg2vips.c @@ -893,8 +893,8 @@ read_jpeg_generate( VipsRegion *or, int y; #ifdef DEBUG - printf( "read_jpeg_generate: line %d, %d rows\n", - r->top, r->height ); + printf( "read_jpeg_generate: %p line %d, %d rows\n", + g_thread_self(), r->top, r->height ); #endif /*DEBUG*/ VIPS_GATE_START( "read_jpeg_generate: work" ); diff --git a/libvips/iofuncs/sinkmemory.c b/libvips/iofuncs/sinkmemory.c index 85ae4371..fca55963 100644 --- a/libvips/iofuncs/sinkmemory.c +++ b/libvips/iofuncs/sinkmemory.c @@ -180,7 +180,7 @@ sink_memory_area_allocate_fn( VipsThreadState *state, void *a, gboolean *stop ) VipsRect image; VipsRect tile; - VIPS_DEBUG_MSG( "sink_memory_area_allocate_fn:\n" ); + VIPS_DEBUG_MSG( "sink_memory_area_allocate_fn: %p\n", g_thread_self() ); /* Is the state x/y OK? New line or maybe new buffer or maybe even * all done. @@ -231,7 +231,8 @@ sink_memory_area_allocate_fn( VipsThreadState *state, void *a, gboolean *stop ) */ wstate->area = memory->area; - VIPS_DEBUG_MSG( " allocated %d x %d:\n", tile.left, tile.top ); + VIPS_DEBUG_MSG( " %p allocated %d x %d:\n", + g_thread_self(), state->pos.left, state->pos.top ); /* Add to the number of writers on the area. */ @@ -260,13 +261,13 @@ sink_memory_area_work_fn( VipsThreadState *state, void *a ) int result; VIPS_DEBUG_MSG( "sink_memory_area_work_fn: %p %d x %d\n", - state, state->pos.left, state->pos.top ); + g_thread_self(), state->pos.left, state->pos.top ); result = vips_region_prepare_to( state->reg, memory->region, &state->pos, state->pos.left, state->pos.top ); VIPS_DEBUG_MSG( "sink_memory_area_work_fn: %p result = %d\n", - state, result ); + g_thread_self(), result ); /* Tell the allocator we're done. */