From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751910AbcFZE7f (ORCPT ); Sun, 26 Jun 2016 00:59:35 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:27128 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbcFZE7e convert rfc822-to-8bit (ORCPT ); Sun, 26 Jun 2016 00:59:34 -0400 X-IBM-Helo: d28dlp02.in.ibm.com X-IBM-MailFrom: xinhui@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH] locking/osq: Drop the overload of osq lock From: panxinhui In-Reply-To: <20160625191217.GO30154@twins.programming.kicks-ass.net> Date: Sun, 26 Jun 2016 12:59:01 +0800 Cc: panxinhui , Boqun Feng , Pan Xinhui , linux-kernel@vger.kernel.org, mingo@redhat.com, dave@stgolabs.net, will.deacon@arm.com, Waiman.Long@hpe.com, benh@kernel.crashing.org Content-Transfer-Encoding: 8BIT References: <1466876523-33437-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> <20160625142447.GK30154@twins.programming.kicks-ass.net> <20160625152130.GA2452@insomnia> <20160625160922.GL30154@twins.programming.kicks-ass.net> <20160625161307.GZ30927@twins.programming.kicks-ass.net> <90D0C23D-65D5-40A8-89F1-4D02506A9CBC@linux.vnet.ibm.com> <20160625191217.GO30154@twins.programming.kicks-ass.net> To: Peter Zijlstra X-Mailer: Apple Mail (2.3124) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16062604-0060-0000-0000-000000B746E0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16062604-0061-0000-0000-00000DE9B4F4 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-06-26_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606260057 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 在 2016年6月26日,03:12,Peter Zijlstra 写道: > > On Sun, Jun 26, 2016 at 01:27:51AM +0800, panxinhui wrote: > >> by the way I still think mutex_unlock has a big overload too. > > Do you mean overhead? > oh, maybe you are right. mutex_unlock ’s implementation uses inc_return variant on ppc, and that’s expensive. I am thinking of using cmpxchg instead.