Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1446335lqj; Tue, 4 Jun 2024 01:33:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyPpBUr4WCj4kazwe5+TYTjkP1FGD/DsHQbgY47FJFAfDfw8cehyDEW7/AQBURG9ePDC54CtLDfo62elHBdGJWbqWQHeMbzEYwICK/IA== X-Google-Smtp-Source: AGHT+IFuMMc3CtfxNz2VOZSjTY7qW0N8Izk+LO5YmtpwuGQRLHYdXvN72FWn46t8uIvRJ6Au6gWK X-Received: by 2002:a05:6358:4320:b0:19c:55ec:2b7 with SMTP id e5c5f4694b2df-19c55ec03bfmr12924755d.12.1717489990104; Tue, 04 Jun 2024 01:33:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717489990; cv=pass; d=google.com; s=arc-20160816; b=x08vG1C0W3JlAsh1ADQU8ZqwwwKuixhW9mzmIQjEYpKLCzcP+dQnPQ/75427t+x2K/ qYBe6O1gNNz9TnQbsAIvAiK7dUPDbM9zzI+hvsNcWTh1mHhkalHrgCiMvuIgsqZ0Ifs/ N7XwnT/XmUtgldJ3oO8ZFHs1A0/xxkV/mGGyxrNtq4nOy4u8R80AYUjyeXVYx0GrRv85 jGBSUhVBOHVYdoC6vRDb0dT5jJUIr1SmEoUfBweoDyU5Eqxzf9lXhpOuthF9EcyvF6jl V679LomNISh/8dcFXj4oJAKvCcqLSjWmwRHtvO/E2OXnHsbPYKRraRY2wmlnpgDhL3KF Ljfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=3q9206INYrAG7YdhDhY5CYic4aGyKfL6FY7ZfCVG+54=; fh=aN2HblZ2MCV2T04z8WowAp9OfuCWyrSSh+pzYyF9OnQ=; b=WYDheUT6CYOBrKWTHGb+PMHPgJ4S5D+Ul4hYdVZRDyk55n1vZmNeUvVkvT3WhId4Ru YrZrYmDT1wB1tPxWwcMw9qpYFsmhkMhnzSy9tQn7uRucCUorTnh1veP1lvu3CcN5iKLE o7JEgKt8LZBx/+fD9YimOwPyNxolkIf1+Edz/6mdlkd5RwBJftmTYMwsLKj7NTlDWP5a sGfSyJZOwNE8bgqWmb+IDxb5yEV8u4aP3OntHJQ7K2INGq8Ma6W3e2tHeQ1j3blhZkek 0MhgGzmYPnAlKLMXulv62+etrAa5N2VTMCgJZ1jbTEkjx8v5wEvULtDyvdTejCAEp5AT MQew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="RYvVr/AO"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-200251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200251-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3540fac8csi1046923a12.87.2024.06.04.01.33.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 01:33:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="RYvVr/AO"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-200251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200251-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C5935281572 for ; Tue, 4 Jun 2024 08:31:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E6671428F5; Tue, 4 Jun 2024 08:31:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RYvVr/AO" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A314513E40F for ; Tue, 4 Jun 2024 08:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717489865; cv=none; b=UUpgk62rna85VaMnGqca6SS7NtMgsMNefSwoELwmY47jK2z3k4J21GchIvErqZkzarfCOTipjp+DQfCaAVokPMtsKmUEl4RQk7xA5XTvT369b2in+GUI4tEnV9+GIp7Ias/XWQG3jzA3uRS9YuKNncfrxS8eUY80Xcwpy2QZjCQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717489865; c=relaxed/simple; bh=3q9206INYrAG7YdhDhY5CYic4aGyKfL6FY7ZfCVG+54=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=qq3R9Gn0UssHQ9go9ab4I5JEt0vvvQhpnHPlWJaWTqrq9mPeVktEWwiVUDoFENrIrI2UnSX12xsFLH2biTHDI5Kxa7Mi3ovRRIsR4DyZcJME095Gdd2PBjaMMjjJlu3oxG5PlbzGwMgcnUNMMBW9KHqGQB8VDMs18UvS63IlXAs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RYvVr/AO; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717489862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=3q9206INYrAG7YdhDhY5CYic4aGyKfL6FY7ZfCVG+54=; b=RYvVr/AOWoFo0dsJF0EIBWWgb5ilfb+ut88J3ogTBPONjpluldi8sz6aPCroC7Q/UpXVpU nQ4cvqMDAnzgx2QRmT9g65ywsS6IeIRY/RI4nz5HG8aZX2b4pv97exb91mBidQq5nIVRs9 D14SlXqQblRpcHQxHl92xuIp5TNKm4k= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-120-NtyJ6A58MTW7lZXfti3WVw-1; Tue, 04 Jun 2024 04:30:59 -0400 X-MC-Unique: NtyJ6A58MTW7lZXfti3WVw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-35e0f2512ddso91607f8f.3 for ; Tue, 04 Jun 2024 01:30:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717489858; x=1718094658; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3q9206INYrAG7YdhDhY5CYic4aGyKfL6FY7ZfCVG+54=; b=rixqCciq38zvc+nRWZCdmS71/w0zlbspspciTsE5DsdpF3JEi0H26GUsUeyL1c4GpB WFOvs6QRyH70eppWgoLs6kMS0EwYTRAscmRo0VrjhjBFMZgRrKxbW3UEUss4g/hw8HVX IboGEnU3n/3g8aJtYS2jLf7YXOGcAaRJtroC7It92JJ52wOBGutUe2qjfJ3warANnxck LJN4UMYITzP1w36SYHErye9oOad7kKIsADG1dueaF9SUYfn0NM/aZyqV2pwiu8ZM+Qdb MFRU4VUTGRO0DwiGrDw2JnxR5nPFQ7FEW8/qMIajy87gPJNHNfj6YnwMAOVNkGvxgzaG M75w== X-Forwarded-Encrypted: i=1; AJvYcCWJsMtRCytUmMAiRgmDb/Dl61dmiQ1ktPP891ZWSqkJid5aGzLb3ygFdSF+8YxBk88RT7Yp+EzhGSuEqxAW4Vw2Xq2TAr1UNfPUHwqH X-Gm-Message-State: AOJu0Ywq+t3hU9+IcVN2tQr+tqiIToHV1PbvDh88TdLwppOqJw+igpbV 1Zfh9xPM/9eMxP0qd9Xg93YvE1iDytnrNzXzaLbaIb0tbj4YW+r8inXC49HMYFsh3h7O/35hcx/ au7pFMYPLwRL9UaLauQWZ+tK7QLBlapNZlRnNJhMtNMAk4bQqmq4bxpEHs0TExw== X-Received: by 2002:a05:600c:1c1d:b0:41f:9c43:574f with SMTP id 5b1f17b1804b1-4212e0c3a8amr90645055e9.3.1717489858435; Tue, 04 Jun 2024 01:30:58 -0700 (PDT) X-Received: by 2002:a05:600c:1c1d:b0:41f:9c43:574f with SMTP id 5b1f17b1804b1-4212e0c3a8amr90644875e9.3.1717489857980; Tue, 04 Jun 2024 01:30:57 -0700 (PDT) Received: from gerbillo.redhat.com ([2a0d:3344:1b74:3a10::f71]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42135511679sm113582315e9.36.2024.06.04.01.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 01:30:57 -0700 (PDT) Message-ID: <111ad356a137d0b69550cd73ff0cdef915c16e2e.camel@redhat.com> Subject: Re: [PATCH net] net/ipv6: Fix the RT cache flush via sysctl using a previous delay From: Paolo Abeni To: Petr Pavlu , Kuifeng Lee Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 04 Jun 2024 10:30:55 +0200 In-Reply-To: References: <20240529135251.4074-1-petr.pavlu@suse.com> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV8Hf8mUwubihiJB/9zPvVq8xfiVbdT0sPzBtxW0fXwrbFxYA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DOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2024-05-31 at 10:53 +0200, Petr Pavlu wrote: > [Added back netdev@vger.kernel.org and linux-kernel@vger.kernel.org > which seem to be dropped by accident.] >=20 > On 5/30/24 17:59, Kuifeng Lee wrote: > > On Wed, May 29, 2024 at 6:53=E2=80=AFAM Petr Pavlu wrote: > > >=20 > > > The net.ipv6.route.flush system parameter takes a value which specifi= es > > > a delay used during the flush operation for aging exception routes. T= he > > > written value is however not used in the currently requested flush an= d > > > instead utilized only in the next one. > > >=20 > > > A problem is that ipv6_sysctl_rtcache_flush() first reads the old val= ue > > > of net->ipv6.sysctl.flush_delay into a local delay variable and then > > > calls proc_dointvec() which actually updates the sysctl based on the > > > provided input. > >=20 > > If the problem we are trying to fix is using the old value, should we m= ove > > the line reading the value to a place after updating it instead of a > > local copy of > > the whole ctl_table? >=20 > Just moving the read of net->ipv6.sysctl.flush_delay after the > proc_dointvec() call was actually my initial implementation. I then > opted for the proposed version because it looked useful to me to save > memory used to store net->ipv6.sysctl.flush_delay. Note that due to alignment, the struct netns_sysctl_ipv6 size is not going to change on 64 bits build. And if the layout would change, that could have subtle performance side effects (moving later fields in netns_sysctl_ipv6 in different cachelines) that we want to avoid for a net patch. > Another minor aspect is that these sysctl writes are not serialized. Two > invocations of ipv6_sysctl_rtcache_flush() could in theory occur at the > same time. It can then happen that they both first execute > proc_dointvec(). One of them ends up slower and thus its value gets > stored in net->ipv6.sysctl.flush_delay. Both runs then return to > ipv6_sysctl_rtcache_flush(), read the stored value and execute > fib6_run_gc(). It means one of them calls this function with a value > different that it was actually given on input. By having a purely local > variable, each write is independent and fib6_run_gc() is executed with > the right input delay. >=20 > The cost of making a copy of ctl_table is a few instructions and this > isn't on any hot path. The same pattern is used, for example, in > net/ipv6/addrconf.c, function addrconf_sysctl_forward(). >=20 > So overall, the proposed version looked marginally better to me than > just moving the read of net->ipv6.sysctl.flush_delay later in > ipv6_sysctl_rtcache_flush(). All in all the increased complexity vs the simple solution does not look worth to me. Please revert to the initial/simpler implementation for this fix, thanks! Paolo