Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1090026imm; Wed, 11 Jul 2018 17:07:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeoxRtCUVjmBCsDG7mewlzCgJ5tewpUBVQa0WVaZuKoaDHHoQvwbhbrU3PmAYqExuwmormC X-Received: by 2002:a65:6688:: with SMTP id b8-v6mr28316pgw.24.1531354067986; Wed, 11 Jul 2018 17:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531354067; cv=none; d=google.com; s=arc-20160816; b=sAW/gWGp6Iimk0/355+ibx81B4jO+kFX9ZDWUrYkFHe3VCsoxpSc8ghVy4985u4VYD jd5jAqRbNarP9MTc74CPbfsdAtVPzMuoHd3G+AbMjLM8KvCmg5hRHQgJkhby2iJKBSQi O/gCCzLEHpswb7JKT70+z6kNyhs5wTmFHpXlG46/FG6Gfm6dZVJVRS4LMsLjTVNAbgbx EHoCGul/IFRsYTdqaUjDlV937uZcml1wHY7QNq8yxHBKBqcQLMVIn4bOUuOpBdAsEcfD /GJznvrkx10cI3Zk70sog8ctSR5AHS0u8bJBmGpNHNbJMtJDtgieLmMY7FzqwnZAbfVp 30yA== 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:mail-followup-to :reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=KN0+NMiMXSx/++bktiwJu64anDaq8lapyeLQhOsrUyc=; b=vLVLVaeW7tk3lbyXnGQxHHT9px1xQdrBB0OiQEKpUAwUwyxPLJkX69M/bj0N9nhdYI v8PjUBqFouAQuiLnV4vBPNQ2v4Xiwuqt/JVp+I4FkYPf/VKLOwRYD0Cv1qq/ZQUhhC90 47Ds0XkptzUYoS0ecLUSIAs8SYKERN2tcr4c2SQs0tC4wDnnNtKdNWquceqzaXNXRCnJ Z7Jvrb8ja4bHSEzGx1g6FyYDQwVH8cSYMhYWatVls/0lfYssS6xOh0WTDkjjQ8WqC0Bg 7F86LCzWe/wP9/11YvuAAf656HDIjVDu8zTho9lB3CHzJEFz46Mi3b+dfDomDwS56ECs vaPw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15-v6si17957260pga.30.2018.07.11.17.07.32; Wed, 11 Jul 2018 17:07:47 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388674AbeGKRmc (ORCPT + 99 others); Wed, 11 Jul 2018 13:42:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:33584 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732492AbeGKRmc (ORCPT ); Wed, 11 Jul 2018 13:42:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5F1B3ACC3; Wed, 11 Jul 2018 17:37:09 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 99B5DDAC99; Wed, 11 Jul 2018 19:37:05 +0200 (CEST) Date: Wed, 11 Jul 2018 19:37:05 +0200 From: David Sterba To: Mark Rutland Cc: dsterba@suse.cz, linux-kernel@vger.kernel.org, Will Deacon , Kees Cook , Boqun Feng , Peter Zijlstra , Ingo Molnar Subject: Re: [PATCH] refcount: always allow checked forms Message-ID: <20180711173705.j6qfye4rq3ccmdyq@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Mark Rutland , linux-kernel@vger.kernel.org, Will Deacon , Kees Cook , Boqun Feng , Peter Zijlstra , Ingo Molnar References: <20180703100102.16615-1-mark.rutland@arm.com> <20180704084641.GL3126@suse.cz> <20180711054946.wdkfoou6kt2a2vml@salmiak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711054946.wdkfoou6kt2a2vml@salmiak> User-Agent: NeoMutt/20180622 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 11, 2018 at 06:49:46AM +0100, Mark Rutland wrote: > > > Dave pointed out that it would be useful to be able to opt-in to full checks > > > regardless of CONFIG_REFCOUNT_FULL, so that we can simplify callsites where we > > > always want checks. I've spotted a few of these in code which is still awaiting > > > conversion. > > > > The motivation was code like > > > > WARN_ON(refcount_read(&ref)); > > if (refcount_dec_and_test(&ref)) { ... } > > > > so the warning is redundant for REFCOUNT_FULL, but I'm going to use the > > _checked versions everywhere the performance of refcounts is not > > critical. > > If you will have conversion patches, do you want to pick this up as the start > of a series? The patches where I'd use the enhanced refcounts are nice-to-have and I don't have an ETA so it would be better if the patch gets merged independently. Thanks.