Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2033503ybb; Fri, 29 Mar 2019 17:13:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuewraiTiw+It478pXUJuU+mL0NVtp5yhZil0ihxGYCn/C9gxekz77DDvC63Trq0WfJeNK X-Received: by 2002:a63:65c4:: with SMTP id z187mr47888762pgb.102.1553904784163; Fri, 29 Mar 2019 17:13:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553904784; cv=none; d=google.com; s=arc-20160816; b=W29y6KUCoi+K3W9F3B1Dx2qOpwm+cp45fWSl8po6leuMBShFN+XqB1uErwh5xnlo0A u2PQ/vcLBpdQHreo4/DyzZVcZv988TJoAhb5YPizbFcDkp8Vp60T9+84SmCFkFXdk+Vh qpxPOR/LC2p6cxENy0uXwkyfRhP0pMbxDREg3gOCuhJayMYRK9LIWxjm5Hykk03czFbG q9VSvN/66F+oPRWMkLbywhIbMN6fEco0ILn4m9OHwLBrORNLleKQEQDDv1kNySBc9QaN wyKTQOvJ7HMy8RefzASCUBd8kIAyM792O/BB1+cRkdDLFFZGYQvKydDMOvQrkm3Bi4At JSBA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=leIGanSXBnqJfF07apwhnkUTykJVkb/IhCS7r9eNUPs=; b=f65YSosD5BFCaiDWWBWqCKBV1q4Bmy8++AJBOds6pYxI1+mxdFCuUvz/naNuoeTDei fQv2FJ0Lm5smlMp8wkAmqYPABpKNgrsyLw7RdN4EpwfejLRalb/8UZEX73TzB+8h9qb9 tQ9Qs2GkhEHOnjrYDMYxdH025mwdrWoKqIvD/awywK3ENovBcSVrT5AB5YZrrNFH4vnT NW9qpOsLuEBkUWriAXkfJO6iiXqGPZoxvnKawmsiyBCa6ACyCcHtn1N1/IxnLfztrYOS sJEF76PSGmqSEj7lZSalN2ICl0W92ouCHceTfklHWigWUY+K+KNFLpZmA3dIyNEezczV Yt6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=Zem8lppq; 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 s12si2944917pgp.241.2019.03.29.17.12.48; Fri, 29 Mar 2019 17:13:04 -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=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=Zem8lppq; 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 S1730374AbfC3AJH (ORCPT + 99 others); Fri, 29 Mar 2019 20:09:07 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:44590 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730154AbfC3AJH (ORCPT ); Fri, 29 Mar 2019 20:09:07 -0400 Received: by mail-qt1-f195.google.com with SMTP id w5so4399420qtb.11 for ; Fri, 29 Mar 2019 17:09:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=leIGanSXBnqJfF07apwhnkUTykJVkb/IhCS7r9eNUPs=; b=Zem8lppqqQWxSaHSGmqmV2HHajEJN8Y63+snvsZlPEaUdl74cT8C+UmIEwV3uZyQAT uxEmxzwpNayUv2VxXNoLn4WupWidxRsZeh/115awtXn1A7YhaQXIuwo8fv2J9+4Bwgtm wYTgE18qqYvzaaWk8bG+7Tcs81qmuptZmOL0xNdd3hQw4+VYg5Kw71DWVF/uPzGGmaNL 9LjxB0ZNYqE8eUmuSi69uqy7dMSGrtmGT2eCtBdQJd5PsXG8iASgGMVSEzbCT8+IJt9V vc/YUc3B75iz3TCh+A4jxjDKLVSDJpqSUyO5qWOeYtNGTc97ZRf9Nco6j4dN0aIB3fvM 9RSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=leIGanSXBnqJfF07apwhnkUTykJVkb/IhCS7r9eNUPs=; b=qzYkpMD/O3NcmVYkMItiQrXOGN36Ty5RYxBVToFwonCA87dnxOfLCElf0yZlmpOtQX 9OINSyFghJrrS/cJye1oAzOi3MWTAnbMHPrUYf+HJcwgmN08MwqxsWuiahcU40+cbyNs tcqFoI/9ntTEIn2HBWvFzdzNstpWBAuWKJqtWFRojpRqQp4N53foKMFtagXKw1Q+QEo7 r+3sZcwkq84xslbyFZKT6NZKyPVzzikurT8ii5aZevGpg8pW0zl86Jmpovqg5GofeHoX LQzaGns8GZiLnWRQXmMUyySRi2CpVrJKNgWALWvtlbF8mZorVF3BE/xXNHZ8K9n4hTZY xbHQ== X-Gm-Message-State: APjAAAXtrpy8kpNIh/PGyzOrdbJ4M9yazKhgE04RKEUvZsWtu/o/YLCb Jn7BzzP5fATCas5tPJ5z1Vtt0A== X-Received: by 2002:ac8:38f5:: with SMTP id g50mr43595848qtc.119.1553904546326; Fri, 29 Mar 2019 17:09:06 -0700 (PDT) Received: from jkicinski-Precision-T1700.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id i63sm1996757qkd.82.2019.03.29.17.09.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Mar 2019 17:09:05 -0700 (PDT) From: Jakub Kicinski To: peterz@infradead.org, tglx@linutronix.de Cc: ard.biesheuvel@linaro.org, yamada.masahiro@socionext.com, mingo@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, oss-drivers@netronome.com, alexei.starovoitov@gmail.com, Jakub Kicinski Subject: [PATCH 0/3] locking/static_key: improve rate limited labels Date: Fri, 29 Mar 2019 17:08:51 -0700 Message-Id: <20190330000854.30142-1-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! This will be used to fix the static branch disabling in the TLS code. The net/tls/ code should be using the deferred static branch type, because unprivileged users can flip the branch on and off quite easily with CONFIG_TLS_DEVICE=y. Second of all we shouldn't take the jump label locks from the RX path, when the socket is destroyed. This can be avoided with some slight code refactoring in deferred static_key as it already runs from a workqueue. This the series (and a simple tls patch which makes use of it) applied opening 0.5M TLS connections to localhost (just calling setsockopt, no data exchange) goes down from 37.9s to 12.4s. Jakub Kicinski (3): locking/static_key: add support for deferred static branches locking/static_key: factor out the fast path of static_key_slow_dec() locking/static_key: don't take sleeping locks in __static_key_slow_dec_deferred() include/linux/jump_label_ratelimit.h | 64 ++++++++++++++++++++++++++-- kernel/jump_label.c | 64 +++++++++++++++------------- 2 files changed, 95 insertions(+), 33 deletions(-) -- 2.21.0