search for: time_to_sleep

Displaying 3 results from an estimated 3 matches for "time_to_sleep".

2003 Jun 18
1
Oops more testing was required....
...can become grossly + * inaccurate. We therefore keep a cumulating number of microseconds + * to wait, and only actually perform the sleep when the rouding + * becomes insignificant. (less than 10%) -- REW. **/ static void sleep_for_bwlimit(int bytes_written) { struct timeval tv; + static int time_to_sleep = 0; if (!bwlimit) return; @@ -427,9 +436,13 @@ assert(bytes_written > 0); assert(bwlimit > 0); - tv.tv_usec = bytes_written * 1000 / bwlimit; - tv.tv_sec = tv.tv_usec / 1000000; - tv.tv_usec = tv.tv_usec % 1000000; + time_to_sleep += bytes_written * 1000 / bwlimit; + + if (t...
2003 Jun 18
0
bwlimit patch.
...can become grossly + * inaccurate. We therefore keep a cumulating number of microseconds + * to wait, and only actually perform the sleep when the rouding + * becomes insignificant. (less than 10%) -- REW. **/ static void sleep_for_bwlimit(int bytes_written) { struct timeval tv; + static int time_to_sleep = 0; if (!bwlimit) return; @@ -427,9 +436,12 @@ assert(bytes_written > 0); assert(bwlimit > 0); - tv.tv_usec = bytes_written * 1000 / bwlimit; - tv.tv_sec = tv.tv_usec / 1000000; - tv.tv_usec = tv.tv_usec % 1000000; + time_to_sleep += bytes_written * 1000 / bwlimit; + + if (t...
2009 May 19
2
[PATCH 1/1] OCFS2: timer to queue scan of all orphan slots
On unlink, all nodes check for the dentry in dcache and if present they mark the node as unlinked. The last node that purges the inode will clean it from orphan directory. When there is a memory pressure, a dentry may not be around and hence the inode is not marked as deleted and this will lead the file to be in the orphan directory till the slot is re-used during next mount. This patch initiates