From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932644AbcFJOkK (ORCPT ); Fri, 10 Jun 2016 10:40:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38757 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932099AbcFJOkG (ORCPT ); Fri, 10 Jun 2016 10:40:06 -0400 Date: Fri, 10 Jun 2016 16:39:59 +0200 From: Oleg Nesterov To: Andrea Parri Cc: Peter Zijlstra , LKML Subject: Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where needed Message-ID: <20160610143959.GA13453@redhat.com> References: <1465496321-10898-1-git-send-email-parri.andrea@gmail.com> <20160610070310.GA6843@redhat.com> <20160610122537.GA7776@redhat.com> <20160610130733.GB8203@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160610130733.GB8203@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 10 Jun 2016 14:40:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/10, Oleg Nesterov wrote: > > On 06/10, Andrea Parri wrote: > > > > More simply/clean, as you said, maybe; one advantage of keeping > > the "raw" smp_read_barrier_depends() in get_trampoline_vaddr() is > > that we can avoid it when area is NULL; > > Do you really think it makes sense to optimize out read_barrier_depends here? > > It can only be NULL in handle_swbp(), and in this case we are going to do a > lot of work, and in particular install this xol vma, Not to mention that alpha doesn't support uprobes, so this all is currently cosmetic. > > a similar solution is adopt- > > ed in kernel/task_work.c:task_work_cancel(). > > Heh ;) this code was written before we had lockless_dereference(). And I do > remember I thought that we need such a helper when read_barrier_depends() > was added. Plus this code still use ACCESS_ONCE for the same reason. I'll send a simple patch, it should not conflict with "Update spin_unlock_wait users" from Peter. Oleg.