search for: delay_n

Displaying 12 results from an estimated 12 matches for "delay_n".

Did you mean: delay_ns
2017 Apr 19
6
[PATCH supermin 0/3] Require root= parameter, refactor init.
Require the root= parameter is passed to specify which root (apppliance) to mount. Libguestfs has done this since 2012. The other two patches are small code refactorings in the init program. Rich.
2017 Apr 19
1
[PATCH supermin] init: Support root=UUID=... to specify the appliance disk by volume UUID.
...r); +static void parse_root_uuid (const char *uuid, unsigned char *raw_uuid); +static int hexdigit (char d); +static int find_fs_uuid (const unsigned char *raw_uuid, int *major, int *minor); +static int parse_dev_file (const char *path, int *major, int *minor); +static void virtio_warning (uint64_t delay_ns, const char *what); static char cmdline[1024]; static char line[1024]; @@ -98,13 +104,11 @@ main () { FILE *fp; size_t n; - char *root, *path; + char *root; size_t len; int dax = 0; uint64_t delay_ns; - int virtio_message = 0; int major, minor; - char *p; const char *...
2017 Apr 25
1
[PATCH supermin v2] init: Support root=UUID=... to specify the appliance disk by volume UUID.
v1 -> v2: - I fixed the end condition of the loop in parse_root_uuid. - Retested. Didn't change the busy wait loop into a function or macro, as per discussion on IRC. Rich.
2017 Apr 19
0
[PATCH supermin 3/3] init: Refactor for-loop which waits for root device to show up.
--- init/init.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/init/init.c b/init/init.c index 473a5c5..a6279b8 100644 --- a/init/init.c +++ b/init/init.c @@ -101,13 +101,19 @@ main () char *root, *path; size_t len; int dax = 0; - uint64_t delay_ns = 250000; + uint64_t delay_ns; int virtio_message = 0; - struct timespec t; int major, minor; char *p; const char *mount_options = ""; + struct timespec t; +#define NANOSLEEP(ns) do { \ + t.tv_sec = delay_ns / 1000000000; \ + t.tv_nse...
2017 Apr 19
0
[PATCH supermin 2/3] init: Move variable declarations to the top of the function.
...changed, 25 insertions(+), 16 deletions(-) diff --git a/init/init.c b/init/init.c index e3d1107..473a5c5 100644 --- a/init/init.c +++ b/init/init.c @@ -96,6 +96,18 @@ static char line[1024]; int main () { + FILE *fp; + size_t n; + char *root, *path; + size_t len; + int dax = 0; + uint64_t delay_ns = 250000; + int virtio_message = 0; + struct timespec t; + int major, minor; + char *p; + const char *mount_options = ""; + mount_proc (); fprintf (stderr, "supermin: ext2 mini initrd starting up: " @@ -132,13 +144,13 @@ main () exit (EXIT_FAILURE); } -...
2012 Jun 12
1
[PATCH] Add virtio-scsi support to febootstrap.
This patch is the minimum possible to add virtio-scsi support to febootstrap. Problem: SCSI devices are detected asynchronously after the Linux kernel module is loaded. The usual solutions to this involve scsi_wait_scan (deprecated apparently) or udev. However febootstrap doesn't use udev, and adding it is a ton of work with a very uncertain outcome. So the minimum possible change is to
2017 Apr 19
1
Re: [PATCH supermin 3/3] init: Refactor for-loop which waits for root device to show up.
On Wed, Apr 19, 2017 at 10:57:28AM +0100, Richard W.M. Jones wrote: > + struct timespec t; > +#define NANOSLEEP(ns) do { \ > + t.tv_sec = delay_ns / 1000000000; \ > + t.tv_nsec = delay_ns % 1000000000; \ > + nanosleep (&t, NULL); \ > + } while(0) > + Defining 't' outside its context is a bit clumsy. See attached version of 3/3 which fixes this. Rich. -- Richard Jone...
2014 Feb 24
2
Re: [Qemu-devel] Adjust disk image migration (NBD)
On Fri, Feb 14, 2014 at 11:58:56AM +0100, Michal Privoznik wrote: > On 14.02.2014 10:40, Joaquim Barrera wrote: > > Hi all, > > > > As I am doing some tests with qemu, I realized that the way it does > > 'migrate -i tcp:DEST:444' is not the same as 'libvirt migrate > > --copy-storage-inc'. Basically qemu uses the same stream as RAM > >
2016 Feb 17
8
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
v1 -> v2: - If we split out the init program into a separate init/ directory, that makes it much easier to build against an alternate libc. I tried to build against uClibc, but uClibc requires an entire build chain, which looked like it was going to be a massive ballache. Rich.
2014 Feb 24
0
Re: [Qemu-devel] Adjust disk image migration (NBD)
...e stall in the guest? > The main > copy loop does take the speed limit into account but perhaps that's > broken too. Yeah, it looks broken. Each iteration of the loop can write much more than sectors_per_chunk sectors, but here: if (s->common.speed) { delay_ns = ratelimit_calculate_delay(&s->limit, sectors_per_chunk); } else { delay_ns = 0; } the second argument is fixed. :/ Paolo
2014 Feb 28
2
Re: [Qemu-devel] Adjust disk image migration (NBD)
...ain >> copy loop does take the speed limit into account but perhaps that's >> broken too. > Yeah, it looks broken. Each iteration of the loop can write much more > than sectors_per_chunk sectors, but here: > > if (s->common.speed) { > delay_ns = ratelimit_calculate_delay(&s->limit, sectors_per_chunk); > } else { > delay_ns = 0; > } > > the second argument is fixed. :/ > > Paolo > Thanks for the answer. Something is still not clear to me. Are we in front of a bug...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...root = strstr (cmdline, "root="); - if (root) { - root += 5; - if (strncmp (root, "/dev/", 5) == 0) - root += 5; - len = strcspn (root, " "); - root[len] = '\0'; - - asprintf (&path, "/sys/block/%s/dev", root); - - uint64_t delay_ns = 250000; - while (delay_ns <= MAX_ROOT_WAIT * UINT64_C(1000000000)) { - fp = fopen (path, "r"); - if (fp != NULL) - goto found; - - if (delay_ns > 1000000000) - fprintf (stderr, - "supermin: waiting another %" PRIu64 " ns for %s to appear\...