remove dead "raw" page format

This commit is contained in:
Sears Russell 2011-11-07 22:38:23 +00:00
parent 20d2196040
commit b39403ea02
6 changed files with 3 additions and 211 deletions

View file

@ -31,7 +31,6 @@ CREATE_EXECUTABLE(pageOrientedListNTA)
CREATE_EXECUTABLE(linearHashNTAThreaded) CREATE_EXECUTABLE(linearHashNTAThreaded)
CREATE_EXECUTABLE(linearHashNTAMultiReader) CREATE_EXECUTABLE(linearHashNTAMultiReader)
CREATE_EXECUTABLE(linearHashNTAWriteRequests) CREATE_EXECUTABLE(linearHashNTAWriteRequests)
CREATE_EXECUTABLE(zeroCopy)
CREATE_EXECUTABLE(sequentialThroughput) CREATE_EXECUTABLE(sequentialThroughput)
CREATE_EXECUTABLE(qos) CREATE_EXECUTABLE(qos)
CREATE_EXECUTABLE(writeBack) CREATE_EXECUTABLE(writeBack)
@ -41,6 +40,9 @@ CREATE_EXECUTABLE(redBlackMemoryOverhead)
CREATE_EXECUTABLE(hashPerformance) CREATE_EXECUTABLE(hashPerformance)
CREATE_EXECUTABLE(seekMap) CREATE_EXECUTABLE(seekMap)
CREATE_EXECUTABLE(rawIOPS) CREATE_EXECUTABLE(rawIOPS)
CREATE_EXECUTABLE(turbine)
CREATE_EXECUTABLE(stride)
CREATE_EXECUTABLE(butterfly)
IF(CHECK_LIBRARY) IF(CHECK_LIBRARY)
ADD_TEST(rose rose) ADD_TEST(rose rose)

View file

@ -1,58 +0,0 @@
#include <stasis/transactional.h>
#include <stasis/bufferManager.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stasis/page/raw.h>
#include <string.h>
int main(int argc, char** argv) {
assert(argc == 3);
#define ZEROCOPY 0
#define LSNMODE 1
int mode = atoi(argv[1]);
int count = atoi(argv[2]);
int longsPerPage = PAGE_SIZE / sizeof(long);
if(ZEROCOPY == mode) {
printf("Running ZEROCOPY mode. Count = %d\n", count);
}
Tinit();
int xid = Tbegin();
long * buf = malloc(longsPerPage * sizeof(long));
for(int i = 0; i < count; i++) {
int pageNum = TpageAlloc(xid);
Page * p = loadPage(xid, pageNum);
if(ZEROCOPY == mode) {
long * data = (long*) rawPageGetData(xid, p);
for(int j = 0; j < longsPerPage; j++) {
data[j] = j;
}
rawPageSetData(xid, 0, p); // XXX writelatch!
} else if(LSNMODE == mode) {
long * data = (long*) rawPageGetData(xid, p);
memcpy(buf, data, PAGE_SIZE);
for(int j = 0; j < longsPerPage; j++) {
buf[j] = j;
}
memcpy(data, buf, PAGE_SIZE);
rawPageSetData(xid, 0, p);
}
releasePage(p);
}
Tcommit(xid);
Tdeinit();
}

View file

@ -36,7 +36,6 @@ ADD_LIBRARY(stasis util/crc32.c
page/uninitialized.c page/uninitialized.c
page/slotted.c page/slotted.c
page/fixed.c page/fixed.c
page/raw.c
page/lsnFree.c page/lsnFree.c
page/segment.c page/segment.c
experimental/latchFree/lfSlotted.c experimental/latchFree/lfSlotted.c

View file

@ -9,7 +9,6 @@
#include <string.h> #include <string.h>
#include <stasis/transactional.h> #include <stasis/transactional.h>
#include <stasis/bufferManager.h> #include <stasis/bufferManager.h>
#include <stasis/page/raw.h>
#include <assert.h> #include <assert.h>

View file

@ -1,52 +0,0 @@
#include <stasis/transactional.h>
#include <stasis/page/raw.h>
#include <stasis/logger/logger2.h>
#include <stasis/truncation.h>
/**
@todo Should rawPageInferMetadata set a page type in the Page
struct?
XXX rawPageInferMetadata is wrong; setting lsn to LogFlushedLSN() breaks
recovery.
XXX still not correct; need an "LSN_FREE" constant.
*/
void rawPageInferMetadata(Page * p) {
p->LSN = 0; //stasis_log_file->first_unstable_lsn(stasis_log_file, LOG_FORCE_WAL);
}
byte* rawPageGetData(int xid, Page * p) {
assertlocked(p->rwlatch);
return units_from_start_raw(byte, p, 0);
}
void rawPageSetData(int xid, lsn_t lsn, Page * p) {
assertlocked(p->rwlatch);
// writelock(p->rwlatch, 255);
rawPageWriteLSN(xid, p, lsn);
// XXX should be handled in releasePage.
stasis_dirty_page_table_set_dirty(stasis_runtime_dirty_page_table(), p);
// unlock(p->rwlatch);
return;
}
lsn_t rawPageReadLSN(const Page * p) {
assertlocked(p->rwlatch);
// There are some potential optimizations here since the page
// doesn't "really" have an LSN at all, but we need to be careful
// about log truncation...
return p->LSN;
}
void rawPageWriteLSN(int xid, Page * p, lsn_t lsn) {
assertlocked(p->rwlatch);
if(p->LSN < lsn) { p->LSN = lsn; }
}
void rawPageCommit(int xid) {
// no-op
}
void rawPageAbort(int xid) {
// no-op
}

View file

@ -1,98 +0,0 @@
/*---
This software is copyrighted by the Regents of the University of
California, and other parties. The following terms apply to all files
associated with the software unless explicitly disclaimed in
individual files.
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose,
provided that existing copyright notices are retained in all copies
and that this notice is included verbatim in any distributions. No
written agreement, license, or royalty fee is required for any of the
authorized uses. Modifications to this software may be copyrighted by
their authors and need not follow the licensing terms described here,
provided that the new terms are clearly indicated on the first page of
each file where they apply.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights" in
the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are
acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.
---*/
/**
* @file
*
* interface for dealing with raw pages
*
* This file provides a re-entrant interface for pages that do not
* contain any metadata that LLADD understands.
*
* @ingroup LLADD_CORE
* $Id$
STRUCTURE OF A RAW PAGE
<pre>
+----------------------------------------------------------------------+
| |
| USABLE SPACE |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+----------------------------------------------------------------------+
</pre>
*/
#include <stasis/common.h>
#include <stasis/page.h>
#define units_from_start_raw(unit,page,count) (((unit*)(page->memAddr))+(count))
/**
@return a pointer to the buffer memory that stores this page.
*/
byte* rawPageGetData(int xid, Page * page);
/**
Inform the raw page implementation that the page is dirty.
*/
void rawPageSetData(int xid, lsn_t lsn, Page * page);
lsn_t rawPageReadLSN(const Page * page);
void rawPageWriteLSN(int xid, Page * page, lsn_t lsn);
/** Should be called when a transaction that has touched this page commits. */
void rawPageCommit(int xid);
/** Should be called when a transaction that has touched this page aborts. */
void rawPageAbort(int xid);