From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751444AbdJWK0z (ORCPT ); Mon, 23 Oct 2017 06:26:55 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:47355 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbdJWK0w (ORCPT ); Mon, 23 Oct 2017 06:26:52 -0400 Date: Mon, 23 Oct 2017 12:26:47 +0200 (CEST) From: Thomas Gleixner To: "Reshetova, Elena" cc: "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "peterz@infradead.org" , "gregkh@linuxfoundation.org" , "viro@zeniv.linux.org.uk" , "tj@kernel.org" , "hannes@cmpxchg.org" , "lizefan@huawei.com" , "acme@kernel.org" , "alexander.shishkin@linux.intel.com" , "eparis@redhat.com" , "akpm@linux-foundation.org" , "arnd@arndb.de" , "luto@kernel.org" , "keescook@chromium.org" , "dvhart@infradead.org" , "ebiederm@xmission.com" , "linux-mm@kvack.org" , "axboe@kernel.dk" Subject: RE: [PATCH 01/15] sched: convert sighand_struct.count to refcount_t In-Reply-To: <2236FBA76BA1254E88B949DDB74E612B802B4359@IRSMSX102.ger.corp.intel.com> Message-ID: References: <1508501757-15784-1-git-send-email-elena.reshetova@intel.com> <1508501757-15784-2-git-send-email-elena.reshetova@intel.com> <2236FBA76BA1254E88B949DDB74E612B802B4359@IRSMSX102.ger.corp.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Oct 2017, Reshetova, Elena wrote: > > On Fri, 20 Oct 2017, Elena Reshetova wrote: > > How did you make sure that these atomic operations have no other > > serialization effect and can be replaced with refcount? > > What serialization effects? Are you taking about smth else than memory > ordering? Well, the memory ordering constraints can be part of serialization mechanisms. Unfortunately they are not well documented .... > For memory ordering my current hope is that we can just make refcount_t > to use same strict atomic primitives and then it would not make any > difference. I think this would be the simplest way for everyone since I > think even some maintainers are having issues understanding all the > implications of "relaxed" ordering. Well, that would make indeed the conversion simpler because then it is just a drop in replacement. Albeit there might be some places which benefit of the relaxed ordering as on some architectures strict ordering is expensive. Thanks, tglx