Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5438310imm; Tue, 31 Jul 2018 10:53:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcN0bhcWqZw3C/tbCfR3q8ai3l2h4uvULMyh5p0vrEcHSWVZ1KRtdvUuffo+iC4LvgGd05Q X-Received: by 2002:a17:902:8645:: with SMTP id y5-v6mr21425438plt.334.1533059616679; Tue, 31 Jul 2018 10:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533059616; cv=none; d=google.com; s=arc-20160816; b=W8oRkwHBuhNxviQs8igODaTAo31dZAQKK/BXTH5D0UK5tvfzDM2gAqEWYA0Sq8lTB2 SjggibGwH361D0yE9E3Bjl/BfBX1SElKLc019MmYsvYu89V77jbutVCj2wdNCm0ssrIW 4tpVIddcqnoYQC/sPJ/u1hALMMkvqaZ18GTSfoooirtOcOe3weS5yXf4tDvzEQg1Wyxb DyAQPrlVrcz2ya7PgEmRuJAeMEjOTsIlehx2ghuCah2b6pRwfO1NZNlG9tqY8euxmaT+ mVesbaqqOG2fW7YJBnxPnRFQzHrNuZ6fmKgIs620WcQknvg0jjBsHPkZ6oIxpZwwwbr4 xFGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=PKElp04UgMwElXRd3OjLixeXgrBPSMQRVTAjbusprc4=; b=UnEmRrZwustTWSQiH6JD2QC5yiDvjpc0U3AO7icIWxF0YPruH/ubAiDBQAZJUGV9cX pyLHF4GwdFNdG8fmvtfROyz4E87aeWCO/UT/xe0sS3g5otX1sVpR0EDH/rYD7mJteG7g XmCmuICvWHEUc+rJ2ka49WlJvNrhMuVCttaTk+xaWoCCyFLeQKWIfx60q2yBLqOiJcM7 8PvsXmM6/ptoPNmfUkpFqLfwFVL+Uwvw8jT3xevftrHEpq8LXNm4oT1YvpGzZ7+kGPB6 vk9m26e2ziWl6D0pk3drdfFcQ606gCgiFbkAF3/d3Qy37XqITZcnGL7SWAMr2lJOG/gC V8Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="TL/gp2T6"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72-v6si2837205pfv.131.2018.07.31.10.53.17; Tue, 31 Jul 2018 10:53:36 -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=@google.com header.s=20161025 header.b="TL/gp2T6"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732161AbeGaTdA (ORCPT + 99 others); Tue, 31 Jul 2018 15:33:00 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42407 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732067AbeGaTc4 (ORCPT ); Tue, 31 Jul 2018 15:32:56 -0400 Received: by mail-pf1-f193.google.com with SMTP id l9-v6so6467516pff.9 for ; Tue, 31 Jul 2018 10:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PKElp04UgMwElXRd3OjLixeXgrBPSMQRVTAjbusprc4=; b=TL/gp2T6VKOIkzJj9VM14lnHYFStQ53Ahj63pcN028SKRr+GSIzVeEOLKFhm1IEgOF 6/lSYSl5AER5sUYxJApEJJu5UWss9U01WwzTcbJFX9S5lL12NVg+psgx9bBHq36TQ3dF QDEgrl3nzZxx4AdRDBhyZ/uU6d7JZTNT9PPUdhF7H/cIwFF+n3hLUo8XUIMZ9tT38Gem KL6EIOjPwmZPJeaAcBxK7bPTmOgrBZa41oy/X/n5e9gyVQlH+n7MB92ieUpmrEfSFKa6 Cm0Cgshqf1sN+YVvzRIx9FDfXggLjPLDnW+Ua/ZfoCnQ5kyiQMSHZ4icGxBzfypQtQJY jz/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PKElp04UgMwElXRd3OjLixeXgrBPSMQRVTAjbusprc4=; b=fo+QXUxS/kBMqo6ia8Uqwy+KNvMxG/nKy5xynjLBfTc87tf3ZLM3lWae/b/pUDIVTf myY4/usu2/BFFqliNsJBNdGPsuwXjIrszmqG2XG/DJis4SH6kz+C7DInnpJh6kbqSSt1 +Es9gjYx3XLZz4DWg+ETQVaZDEBeMzuonc6ahsPvJ7kBMxOBHJXj4EeB175OnSfBS8VB ippgCnLnwIpZ740IjOEiRNuMOVGcYuBF5P9+EQrO3PtDtunIVTFcqTpzyI+kB22/U4NA mNjp5CLHDzngl96Li6SnIWj+KaU4TTUQWzR/DgrekzfMEzqhbTaFg+JAIHHFE9GrhVLP q6zA== X-Gm-Message-State: AOUpUlERgj0eIh3a3XNxUnLEATVJP9/N1G3zetS2frF0BJU/OM9/BrbN Bjw1NEP0F/B9Iwjb7T1E6YzDsElZBTZ9aMyprY04Bg== X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr21820229pgp.334.1533059490212; Tue, 31 Jul 2018 10:51:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:ac14:0:0:0:0 with HTTP; Tue, 31 Jul 2018 10:51:09 -0700 (PDT) In-Reply-To: References: <01000164f169bc6b-c73a8353-d7d9-47ec-a782-90aadcb86bfb-000000@email.amazonses.com> From: Dmitry Vyukov Date: Tue, 31 Jul 2018 19:51:09 +0200 Message-ID: Subject: Re: SLAB_TYPESAFE_BY_RCU without constructors (was Re: [PATCH v4 13/17] khwasan: add hooks implementation) To: Eric Dumazet Cc: Christoph Lameter , Andrey Ryabinin , "Theodore Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, Greg Kroah-Hartman , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , David Miller , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev , Gerrit Renker , dccp@vger.kernel.org, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, David Airlie , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alexey Kuznetsov , Hideaki YOSHIFUJI , Ursula Braun , linux-s390@vger.kernel.org, LKML , Andrew Morton , linux-mm , Andrey Konovalov , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 31, 2018 at 7:41 PM, Eric Dumazet wrote: > On Tue, Jul 31, 2018 at 10:36 AM Christopher Lameter wrote: > >> >> If there is refcounting going on then why use SLAB_TYPESAFE_BY_RCU? > > To allow fast reuse of objects, without going through call_rcu() and > reducing cache efficiency. > > I believe this is mentioned in Documentation/RCU/rculist_nulls.txt Is it OK to overwrite ct->status? It seems that are some read and writes to it right after atomic_inc_not_zero.