Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1756117ybb; Fri, 29 Mar 2019 10:38:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDQyIi1szENM/5azPOHWQd6qCu5NEO0uxx500feQvm/XOe3ksXIANTbLHSeT26VLjI7ftm X-Received: by 2002:a63:530e:: with SMTP id h14mr22866436pgb.136.1553881103289; Fri, 29 Mar 2019 10:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553881103; cv=none; d=google.com; s=arc-20160816; b=AtoJtEuXyLgzN/Be6y1bbJe+m5idNposvYKlxQPREitOlTfbDjrJ4AEnth2jqvsBUF PhqKii0XkmeCqzimz4hQntIVuS7FgnWb80AstADyBDtI4IyDnNGl3kr2a7aeZu4INQKS QeLGBiNMfGDv0bFd1LPAUCyRGcwD7xYM9M0DfwFK3T+cs9PvwJT9TZ6Z5M7YxRI7j0t6 0Y4BE+5DFlz6Aj/QAhdFHjROo8vhSPnQwoSfgKOrm6jR0G2XthZvg/AbyZTpg3vpBy4Q isFvwnnwlUdt2woMVvWZkfkbKwBO9MCRIFN0R1nLVPLgRRMw5Tete80zcY4W+JWyMy93 ujXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vK9JF4Huzr3i/LlaG8vqBt9PGaW2AzevMUccmgFHN9k=; b=U9vhVCLG257EiyuKqbBGn4VJXjK2UGQBOP0kWcKZuuY/rhAb4t9Lb+Dstp9mFMJHhw z/7CqLvA6IDWmuU+1l/VLIpGLm1jHjCi6wbxJgiOyicU+jEmgM/OGjmnc5EFUKdZWhxE VPm3MUQMuCMauOB/dFuc2+ssGWDVSczXXLB37WoHNcob5PGKApYLyIDkRSjJ85AXZteX NwoRMICLHBRht/FElKIwRcVlI6cJhTAROxX537VsShG08KWCf1X7IUecq/PJSmqBiLfn HOOk3PnIfe7jtN6inVN/0rRYcU7KLhlfP6zDIAbD2hz6V96JsTIsAqUbiSiEwEEssHBE lauA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si2235290pga.454.2019.03.29.10.38.07; Fri, 29 Mar 2019 10:38:23 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729846AbfC2Rh1 (ORCPT + 99 others); Fri, 29 Mar 2019 13:37:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54472 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbfC2Rh1 (ORCPT ); Fri, 29 Mar 2019 13:37:27 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 04B4581DE3; Fri, 29 Mar 2019 17:37:27 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.68]) by smtp.corp.redhat.com (Postfix) with SMTP id BE83960BFB; Fri, 29 Mar 2019 17:37:24 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 29 Mar 2019 18:37:26 +0100 (CET) Date: Fri, 29 Mar 2019 18:37:23 +0100 From: Oleg Nesterov To: Joel Fernandes Cc: Jann Horn , Kees Cook , "Eric W. Biederman" , LKML , Android Kernel Team , Kernel Hardening , Andrew Morton , Matthew Wilcox , Michal Hocko , "Reshetova, Elena" Subject: Re: [PATCH] Convert struct pid count to refcount_t Message-ID: <20190329173723.GB23683@redhat.com> References: <20190327145331.215360-1-joel@joelfernandes.org> <20190328023432.GA93275@google.com> <20190328142619.GA19441@redhat.com> <20190328143958.GB261521@google.com> <20190329023456.GB194158@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190329023456.GB194158@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 29 Mar 2019 17:37:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/28, Joel Fernandes wrote: > > Also Oleg, why not just call refcount_dec_and_test like below? Of course we can, this is just optimization to avoid the atomic op if possible. Does this optimization really help? I have no idea ;) But as you can see, it surely helps to provoke the interesting discussions! Oleg.