[CRIU] [PATCH] inet: tcp -- Find size of max memory allowed to restore TCP data, v2

Cyrill Gorcunov gorcunov at gmail.com
Mon Oct 7 08:57:49 PDT 2013


On Mon, Oct 07, 2013 at 07:49:12PM +0400, Pavel Emelyanov wrote:
> On 10/07/2013 07:18 PM, Cyrill Gorcunov wrote:
> > On Mon, Oct 07, 2013 at 05:22:09PM +0400, Cyrill Gorcunov wrote:
> >>
> >> Yeah, I'll check the sysctl engine code, thanks! As to read queue -- I think yes,
> >> you're right, I'll update, thanks!
> > 
> > Update attached.
> > 
> 
> 
> > +int tcp_read_sysctl_limits(void)
> > +{
> > +	u32 vect[2][3] = { };
> > +	int ret;
> > +
> > +	struct sysctl_req req[] = {
> > +		{ "net/ipv4/tcp_wmem", &vect[0], CTL_U32A(ARRAY_SIZE(vect[0])) },
> > +		{ "net/ipv4/tcp_rmem", &vect[1], CTL_U32A(ARRAY_SIZE(vect[0])) },
> > +		{ },
> > +	};
> > +
> > +	/*
> > +	 * Simply use default values.
> > +	 */
> > +	if (access("/proc/sys/net/ipv4", X_OK)) {
> > +		pr_info("IPv4 sysctls are missing\n");
> > +		return 0;
> > +	}
> > +
> 
> Huh?

If for some reason there won't be such things in the kernel (say we
start using this routine inside ns environment or the kernel won't
have ipv4 support at all) we should not fail, but simply continue
execution I think. No?


More information about the CRIU mailing list