Displaying 7 results from an estimated 7 matches for "sleep_for_bwlimit".
2003 Jun 18
1
Oops more testing was required....
...t we actually wait at least
+ * the requested number of microseconds, this 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 %...
2003 Jun 18
0
bwlimit patch.
...t we actually wait at least
+ * the requested number of microseconds, this 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 %...
2009 Nov 09
3
DO NOT REPLY [Bug 6881] New: --bwlimit option uses KiB/s, but is documented as (what amounts to) kB/s
...OS/Version: All
Status: NEW
Severity: trivial
Priority: P3
Component: core
AssignedTo: wayned at samba.org
ReportedBy: rlaager at wiktel.com
QAContact: rsync-qa at samba.org
The --bwlimit option seems to use KiB/s, as io.c's sleep_for_bwlimit() function
divides by 1024. It's documented as "KBPS", "KBytes per second", and "kilobytes
per second".
I'm going to attach a patch which standardizes all of this as KiB/s and
"kibibytes per second", to match the actual usage.
Given that this is a n...
2007 Oct 04
2
rsync stops/hangs (from windows to debian)
We've been using rsync to send updates to our webservers from a central location for years. All the webservers used to be Windows 2000 Server running rsync 2.6.3. Recently I've been trying to replace them with Debian servers with rsync 2.6.9. The central file server is a Windows 2000 Server using the cwRsync binary. It was also 2.6.3 until I upgraded it to use 2.6.9 also.
The initial
2004 Apr 19
3
[PATCH] time limit
...60);
+
+ return ( tv.tv_sec > expiration_time ) ? 1 : 0;
+}
/**
* Write len bytes to the file descriptor @p fd.
@@ -772,6 +793,7 @@
fd_set w_fds, r_fds;
int fd_count, count;
struct timeval tv;
+ int time_expired = 0;
msg_list_push(NORMAL_FLUSH);
@@ -837,6 +859,14 @@
}
sleep_for_bwlimit(ret);
+ if( timelimit ) {
+ time_expired = has_timelimit_expired();
+ if( 1 == time_expired ) {
+ rprintf(FERROR, RSYNC_NAME ": \n%d minute time limit exceeded.\n", timelimit);
+ exit_cleanup(RERR_PARTIAL);
+ }
+ }
+
total += ret;
diff -urN rsync-2.6.1pre...
2004 Apr 22
2
[PATCH] --timelimit and --stopat
...time(NULL);
+
+ return ( now > stop_time_secs ) ? 1 : 0;
+}
/**
* Write len bytes to the file descriptor @p fd.
@@ -772,6 +825,7 @@
fd_set w_fds, r_fds;
int fd_count, count;
struct timeval tv;
+ int time_expired = 0;
msg_list_push(NORMAL_FLUSH);
@@ -837,6 +891,19 @@
}
sleep_for_bwlimit(ret);
+
+ if( timelimit ) {
+ time_expired = has_timelimit_expired();
+ if( 1 == time_expired ) {
+ rprintf(FERROR, RSYNC_NAME ": \n%d minute time limit exceeded.\n", timelimit);
+ exit_cleanup(RERR_PARTIAL);
+ }
+ }
+
+ if( stopat && has_stopat_expired() )...
2005 Apr 27
7
[Bug 2654] timeout is always triggered with 2.6.4
https://bugzilla.samba.org/show_bug.cgi?id=2654
wayned@samba.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From wayned@samba.org 2005-04-27 02:21 -------
The generator's setting of the ignore_timeout