Re: [PATCH 1/3] c/r: call restore_notify_error for restart (not checkpoint !)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2009-12-06 at 15:08 -0500, Oren Laadan wrote:
> +static inline int ckpt_get_error(struct ckpt_ctx *ctx)
> +{
> +       /* errno is set after error flag: make sure we don't miss it */
> +       while (!ctx->errno)
> +               yield();
> +       return ctx->errno;
> +}

I would think that this would be a more proper place to use something
like a completion queue or a lock.  A yield loop seems a bit sketchy.

How about a r/w mutex?  The people waiting for the checkpoint to
complete attempt to acquire reads, and the guy setting ctx->errno
releases the write after it gets set.

-- Dave

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux