From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754043AbdJIHhy (ORCPT ); Mon, 9 Oct 2017 03:37:54 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52440 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753856AbdJIHhx (ORCPT ); Mon, 9 Oct 2017 03:37:53 -0400 Subject: Re: [PATCH] page_alloc.c: inline __rmqueue() To: Aaron Lu , linux-mm , lkml References: <20171009054434.GA1798@intel.com> Cc: Andrew Morton , Andi Kleen , Dave Hansen , Huang Ying , Tim Chen , Kemi Wang From: Anshuman Khandual Date: Mon, 9 Oct 2017 13:07:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20171009054434.GA1798@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17100907-0020-0000-0000-000003BEB705 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100907-0021-0000-0000-000042511C4E Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-09_02:,, 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-1707230000 definitions=main-1710090109 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/09/2017 11:14 AM, Aaron Lu wrote: > __rmqueue() is called by rmqueue_bulk() and rmqueue() under zone->lock > and that lock can be heavily contended with memory intensive applications. > > Since __rmqueue() is a small function, inline it can save us some time. > With the will-it-scale/page_fault1/process benchmark, when using nr_cpu > processes to stress buddy: > > On a 2 sockets Intel-Skylake machine: > base %change head > 77342 +6.3% 82203 will-it-scale.per_process_ops > > On a 4 sockets Intel-Skylake machine: > base %change head > 75746 +4.6% 79248 will-it-scale.per_process_ops > > This patch adds inline to __rmqueue(). > > Signed-off-by: Aaron Lu Ran it through kernel bench and ebizzy micro benchmarks. Results were comparable with and without the patch. May be these are not the appropriate tests for this inlining improvement. Anyways it does not have any performance degradation either. Reviewed-by: Anshuman Khandual Tested-by: Anshuman Khandual