[CRIU] [PATCH] inet: tcp -- Find size of max memory allowed to restore TCP data, v2
Pavel Emelyanov
xemul at parallels.com
Mon Oct 7 08:49:12 PDT 2013
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?
More information about the CRIU
mailing list