Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5453317imm; Tue, 16 Oct 2018 10:26:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV60jou9bIzOCHvqBM4uRAJoHIT8cdBlvn5wm2LmfunqCG0XQcQ/J3WGrArrA2vAgmmXKPt8l X-Received: by 2002:a65:4d03:: with SMTP id i3-v6mr21065761pgt.239.1539710808364; Tue, 16 Oct 2018 10:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710808; cv=none; d=google.com; s=arc-20160816; b=aKkqsMqTCcKOJYtc5GRDvnq4y9z+sVtSTzK/v3tncsJhZH8K3A1aUJNfzCvfApatgg C4CHDlmSIiiNnNH3sFb6wGydDBeA6SS1tSNpe8+faU5UEwkGWgtYw3SXuX1ZtAgzQvMd /R0XxHn6vK36hwzBL9J9QMe8R69n54JcEqNbaL6Ha3axv8hKGsudBB6+ccOxy1LX2jTe SUyG6TfaSoiv6K8Ir7ZBKEmC2Kpu3pD5Xq1Ro9ZDvgWrpIhVu+QQvRqGf4MYbWzcI98Y alDwZQbFOkU79i5mvW4Wm6wnvY5b/UEe5fQXdPs2ElElqb6rCBWAn4U0RQe2oDaMxIcT +DGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7hrrz2KM+xPbHX3Xoh5Wf8Y4YaD7UsgAakxz3qYprzg=; b=NiB/AtzobZ5d/KND5cr33fk9gzPtDUQpBDn5qKBR2uI5D+R6mowXkrfeVoCEiect+C 1K/60/SjI/YmxTpvmLP+AmqfWobXLjpWc118OZgp/UAI30rEum6Zi7lKbnKm9YcqpMOJ E/wpbZAztYM4to/Y6DlpKno5t4hN/KLJDB01I2Sb0PNdPXCSpKn8d1T+Izgknje+n7Ot wzLIqU9QKJotkCDDPx0PRvYaqfQdhQGaTw7YyZCWOUTm+GattJy4dxZuo5zXGhrtbv4A qyzzlA9Fodx1Nu6gxktCz8tjrXXi9n4tQder+pJQhXNwaxq2IXzcczfVzWR76715dx7/ snGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ga24jAnF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2-v6si14511105plp.139.2018.10.16.10.26.32; Tue, 16 Oct 2018 10:26:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ga24jAnF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731832AbeJQBQW (ORCPT + 99 others); Tue, 16 Oct 2018 21:16:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:35094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730396AbeJQBQU (ORCPT ); Tue, 16 Oct 2018 21:16:20 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 639CE20866; Tue, 16 Oct 2018 17:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710694; bh=7KkJe5SBNQN7tpnHXL9VtI4NDeylxfbk0r6TMICSNX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ga24jAnFl1pu1Hva+wIcx6BXWk/ofw/HmN2iR92G5Ji9CCpXyp9Z3iJe2qwJtKQEt eVNpeltFeZBKj6SmdiQG3Q6PW1FnCPExQL7pyQOlNbZs61UiIHy2GkK7CGdyU+aCFw dhBoWnMIn+trROF/xtd0hYcnKB6qbbCQaulQhISQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" Subject: [PATCH 4.9 58/71] inet: frags: reorganize struct netns_frags Date: Tue, 16 Oct 2018 19:09:55 +0200 Message-Id: <20181016170542.276848195@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170539.315587743@linuxfoundation.org> References: <20181016170539.315587743@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet Put the read-mostly fields in a separate cache line at the beginning of struct netns_frags, to reduce false sharing noticed in inet_frag_kill() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit c2615cf5a761b32bf74e85bddc223dfff3d9b9f0) Signed-off-by: Greg Kroah-Hartman --- include/net/inet_frag.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -4,16 +4,17 @@ #include struct netns_frags { - struct rhashtable rhashtable ____cacheline_aligned_in_smp; - - /* Keep atomic mem on separate cachelines in structs that include it */ - atomic_long_t mem ____cacheline_aligned_in_smp; /* sysctls */ long high_thresh; long low_thresh; int timeout; int max_dist; struct inet_frags *f; + + struct rhashtable rhashtable ____cacheline_aligned_in_smp; + + /* Keep atomic mem on separate cachelines in structs that include it */ + atomic_long_t mem ____cacheline_aligned_in_smp; }; /**