Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp893985img; Tue, 26 Feb 2019 10:21:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IYOnws07YZCYHUiJrLvEQbJOzrKmRlubVlhtfn+NTKiDdR5qDQLhDCoY4uI61ZtRzWCMO1z X-Received: by 2002:a63:4718:: with SMTP id u24mr21250820pga.381.1551205274658; Tue, 26 Feb 2019 10:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551205274; cv=none; d=google.com; s=arc-20160816; b=cJJr7GPUQxu29QpC4whT7YP8DjdeaCNnl/FsUuunwr49IuPaaQ5XGxN7K/NySz08ZD 7+YWPOu8+55tyjSg7+h0R0OGPRTosToCmHWN205HSnEYq3dyx0ainJe8p9EJrnrgnAnL sJ3MV8Nkj09J0Ig65FbgmjMCqFO7CTiBWlFuQeLYkmm+U4a6PPPJAkytG8hLVA26EfTr NJIlrBZTdHHA//Zbykxwv0Kjzaw1MEbC0J/XCH0q5nIkT1kpzY5kTHAfTWQBy14pk/99 s6UxuCq/HfNb0f0exwKhk6FiCUuPcqIUPtY2lnNIfFlmX9tQu8yXH3hLfUr5UwjqE3sM Q2KA== 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=jWRzH1t9/NgJyEKPpYVmHF9nYf8yl58SZvBxWlOsf4g=; b=TIvVTofvhvo2en+OM+SfCX6w4EOWMMjgtRGKWghUaQRgXN+PTsJrXBL1fKnA1kXsQl FtZehcJEBN4w6FjznKSlnbFhtJYc56gO1pgMePZGZ+8EfbKghgKBGApPQc7MSiGE9OK0 c1vYisBLLaHRCXO0Ma0YGAwOjuD2m/URfjHMlzygYLXiFTt5TfgGZZxIlmt+g9B70d0V rGhNbDuBkr0bK/8nDUNXc59Y/sYrlssa9hZVI0ipWDTg+fZdVflQJQvM4TQ8wYtAhHMj htGMCsgC5yV+jRz4HxtGGDXudAcFiXex3H7vZsCun4ZsfxvE8cd1tZHvYY5QGK0e3oSi xJJg== 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 n17si12866045pff.225.2019.02.26.10.20.59; Tue, 26 Feb 2019 10:21:14 -0800 (PST) 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 S1729154AbfBZSUX (ORCPT + 99 others); Tue, 26 Feb 2019 13:20:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:50242 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728793AbfBZSUW (ORCPT ); Tue, 26 Feb 2019 13:20:22 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 827E8ACD3; Tue, 26 Feb 2019 18:20:21 +0000 (UTC) Date: Tue, 26 Feb 2019 10:20:13 -0800 From: Davidlohr Bueso To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Arnd Bergmann , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Andrew Morton , Tim Chen Subject: Re: [PATCH-tip v2 00/10] locking/rwsem: Rwsem rearchitecture part 1 Message-ID: <20190226182013.iynflounqufjtnli@linux-r8p5> References: <1550263810-31947-1-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1550263810-31947-1-git-send-email-longman@redhat.com> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Feb 2019, Waiman Long wrote: > v2: > - Sync up to v4 of the part 0 patch. > - Remove the rwsem.h->rwsem-xadd.h renaming patch & change patches > to modify rwsem.h instead of rwsem-xadd.h. > - Add a new patch to micro-optimize rwsem_try_read_lock_unqueued(). > >This is part 1 of a 3-part (0/1/2) series to rearchitect the internal >operation of rwsem. This depends on the v4 part 0 patches sent out >previously > >https://lore.kernel.org/lkml/1550095217-12047-1-git-send-email-longman@redhat.com > >This part lays the foundation for part 2 without making any functional >changes. This part includes the following changes: > > 1) Move code around and micro-optimize rwsem_try_read_lock_unqueued() > (patches 1-4). > 2) Enhance the DEBUG_RWSEMS_WARN_ON() macro to provide more information > and add additional checks (patches 5 & 6). > 3) Make the core qspinlock_stat.h code generic (lock event counting) > so that it can be used by all the architectures as well as other > locking subsystems such as rwsem (patches 7-10). Lock event > counting help us visualize how frequently a code path is being > used as well as spotting abnormal behavior due to bugs in the code > without noticeably affecting kernel performance and hence behavior. > >Both (2) and (3) are useful debugging aids. Yes, this will come in handy in the future. Feel free to add my: Acked-by: Davidlohr Bueso Thanks.