Code

dropping cache after update does not help (in this implementation)
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 30 May 2007 11:26:50 +0000 (11:26 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 30 May 2007 11:26:50 +0000 (11:26 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1091 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_update.c

index ed79a6a15b1856b2a153468a8c4b0036ff40a9c0..7a73fdfa2600e53c79685bb68ab6516ab48693f8 100644 (file)
@@ -1404,20 +1404,6 @@ _rrd_update(const char *filename, const char *tmplt, int argc, const char **argv
        return(-1);
     }
     
-#ifdef HAVE_POSIX_FADVISExxx
-
-    /* with update we have write ops, so they will probably not be done by now, this means
-       the buffers will not get freed. But calling this for the whole file - header
-       will let the data off the hook as soon as it is written when if it is from a previous
-       update cycle. Calling fdsync to force things is much too hard here. */
-
-    if (0 != posix_fadvise(fileno(rrd_file), rra_begin, 0, POSIX_FADV_DONTNEED)) {
-         rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s",filename, rrd_strerror(errno));
-         fclose(rrd_file);
-         return(-1);
-    } 
-#endif
-
     /* OK now close the files and free the memory */
     if(fclose(rrd_file) != 0){
        rrd_set_error("closing rrd");
@@ -1455,14 +1441,6 @@ _rrd_update(const char *filename, const char *tmplt, int argc, const char **argv
            rra_start += rrd.rra_def[i].row_cnt
              *rrd.stat_head->ds_cnt*sizeof(rrd_value_t);
          }
-#ifdef HAVE_POSIX_FADVISExxx
-          /* same procedure as above ... */
-          if (0 != posix_fadvise(fileno(rrd_file), rra_begin, 0, POSIX_FADV_DONTNEED)) {
-             rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s",filename, rrd_strerror(errno));
-             fclose(rrd_file);
-             return(-1);
-          } 
-#endif
          fclose(rrd_file);
        }
     rrd_free(&rrd);