Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1693/sql/src/backends/monet5

Modified Files:
      Tag: Feb2010
        sql.mx 
Log Message:

BATpreload_() & BATpreload() now have a second argument,
that takes a hint for the access pattern used on the preloaded heaps
(BUF_{NORMAL,RANDOM,SEQUENTIAL,WILLNEED,DONTNEED}).

BATprealod_() *could* than use to give mmap advise by calling BATmadvise()
with the given hint for thet BUN heaps (and BUF_WILLNEED (or BUF_RANDOM ?))
for the string heaps due to their inherently random access.
For now, calling BATmadvise() has not been activated in BATpreload_(),
mainly as (1) the effects have not yet been ananlysed in detail and
(2) the given advise might need to be un-/re-set after using the heaps
to ensure proper memory management.

Hence, this checkin in mainly to record the BUN heap access pattern
(BUF_SEQUENTIAL or BUF_WILLNEED (for both random and repeated access))
of each currently present BATpreload{_,}() call.

I also commented out some effectless BATpreload_(bn) on newly allocated
result BATs, and added BATpreload_() for the input, instead.


Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.389.2.2
retrieving revision 1.389.2.3
diff -u -d -r1.389.2.2 -r1.389.2.3
--- sql.mx      6 Feb 2010 12:59:35 -0000       1.389.2.2
+++ sql.mx      11 Feb 2010 08:36:53 -0000      1.389.2.3
@@ -2305,7 +2305,7 @@
        if ( t == NULL)
                throw(MAL,"sql.append","Table missing");
        if (tpe == TYPE_bat)
-               BATpreload((BAT*)ins);  
+               BATpreload((BAT*)ins, BUF_SEQUENTIAL);  
        c = mvc_bind_column(m, t, cname);
        if (c) {
                store_funcs.append_col(m->session->tr, c, ins, tpe);
@@ -2352,7 +2352,7 @@
        if ( t == NULL)
                throw(MAL,"sql.update","Table missing");
        if (tpe == TYPE_bat)
-               BATpreload((BAT*)ins);  
+               BATpreload((BAT*)ins, BUF_SEQUENTIAL);  
        c = mvc_bind_column(m, t, cname);
        if (c) {
                store_funcs.update_col(m->session->tr, c, ins, tpe, 0);
@@ -3333,7 +3333,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, ty...@1, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload(b, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                str v = (str)BUNtail(bi,p);
                @1 r;
@@ -3361,7 +3361,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, ty...@1, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload(b, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                str v = (str)BUNtail(bi,p);
                @1 r;
@@ -3484,7 +3484,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, ty...@1, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload(b, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                str v = (str)BUNtail(bi,p);
                @3 r;
@@ -3599,7 +3599,7 @@
        bi = bat_iterator(b);
        dst = BATnew(b->htype, TYPE_str, BATcount(b));
        BATseqbase(dst, b->hseqbase);
-       BATpreload(b);
+       BATpreload(b, BUF_SEQUENTIAL);
        BATloop(b,p,q) {
                ptr v = (ptr)BUNtail(bi,p);
                msg = SQLstr_cast_( &r, m, *eclass, *d1, *s1, *has_tz, v, 
b->ttype, *digits);


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to