Changeset: 2cdfaed6227c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2cdfaed6227c Modified Files: gdk/gdk_storage.c Branch: Dec2016 Log Message:
If we have MS_ASYNC, i.e. asynchronous msync, use it instead of forking off a thread. diffs (38 lines): diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -637,6 +637,7 @@ DESCclean(BAT *b) #define MSYNC_BACKGROUND #ifndef DISABLE_MSYNC +#ifndef MS_ASYNC struct msync { bat id; Heap *h; @@ -652,11 +653,18 @@ BATmsyncImplementation(void *arg) GDKfree(arg); } #endif +#endif void BATmsync(BAT *b) { #ifndef DISABLE_MSYNC +#ifdef MS_ASYNC + if (b->theap.storage == STORE_MMAP) + (void) msync(b->theap.base, b->theap.free, MS_ASYNC); + if (b->tvheap && b->tvheap->storage == STORE_MMAP) + (void) msync(b->tvheap->base, b->tvheap->free, MS_ASYNC); +#else #ifdef MSYNC_BACKGROUND MT_Id tid; #endif @@ -694,6 +702,7 @@ BATmsync(BAT *b) BATmsyncImplementation(arg); #endif } +#endif #else (void) b; #endif /* DISABLE_MSYNC */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list