O_DIRECT is working now.
This commit is contained in:
parent
3cbe112926
commit
c649ba7504
3 changed files with 8 additions and 5 deletions
|
@ -78,9 +78,9 @@ terms specified in this license.
|
||||||
/*#define MAX_BUFFER_SIZE 100003 */
|
/*#define MAX_BUFFER_SIZE 100003 */
|
||||||
/*#define MAX_BUFFER_SIZE 10007*/
|
/*#define MAX_BUFFER_SIZE 10007*/
|
||||||
/*#define MAX_BUFFER_SIZE 5003*/
|
/*#define MAX_BUFFER_SIZE 5003*/
|
||||||
/*#define MAX_BUFFER_SIZE 71 */
|
#define MAX_BUFFER_SIZE 71
|
||||||
#define MAX_BUFFER_SIZE 7
|
/*#define MAX_BUFFER_SIZE 7 */
|
||||||
#define BUFFER_ASOOCIATIVE 2
|
/*#define BUFFER_ASOOCIATIVE 2 */
|
||||||
|
|
||||||
#define MAX_TRANSACTIONS 1000
|
#define MAX_TRANSACTIONS 1000
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,9 @@ terms specified in this license.
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
/* _XOPEN_SOURCE is needed for posix_memalign */
|
||||||
|
#define _XOPEN_SOURCE 600
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <lladd/common.h>
|
#include <lladd/common.h>
|
||||||
|
@ -425,7 +428,7 @@ void pageInit() {
|
||||||
for(int i = 0; i < MAX_BUFFER_SIZE+1; i++) {
|
for(int i = 0; i < MAX_BUFFER_SIZE+1; i++) {
|
||||||
pool[i].rwlatch = initlock();
|
pool[i].rwlatch = initlock();
|
||||||
pool[i].loadlatch = initlock();
|
pool[i].loadlatch = initlock();
|
||||||
pool[i].memAddr = malloc(PAGE_SIZE);
|
assert(!posix_memalign((void*)(&(pool[i].memAddr)), PAGE_SIZE, PAGE_SIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_init(&lastFreepage_mutex , NULL);
|
pthread_mutex_init(&lastFreepage_mutex , NULL);
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
This file handles all of the file I/O for pages.
|
This file handles all of the file I/O for pages.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "page.h"
|
#include "page.h"
|
||||||
#include <lladd/bufferManager.h>
|
#include <lladd/bufferManager.h>
|
||||||
|
|
||||||
|
@ -103,6 +102,7 @@ void pageWrite(Page * ret) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_lock(&stable_mutex);
|
pthread_mutex_lock(&stable_mutex);
|
||||||
|
|
||||||
offset = myLseekNoLock(stable, pageoffset, SEEK_SET);
|
offset = myLseekNoLock(stable, pageoffset, SEEK_SET);
|
||||||
assert(offset == pageoffset);
|
assert(offset == pageoffset);
|
||||||
assert(ret->memAddr);
|
assert(ret->memAddr);
|
||||||
|
|
Loading…
Reference in a new issue