Received: by 10.192.165.148 with SMTP id m20csp1136025imm; Wed, 2 May 2018 14:57:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp8gWD6PRhjJ6RlGA6KSW3KmePh8pSOY0L6hvCMsc1iPWAuLku2TKfl2Wwj4tQmJrFRrHP0 X-Received: by 2002:a65:534d:: with SMTP id w13-v6mr17732211pgr.429.1525298223153; Wed, 02 May 2018 14:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525298223; cv=none; d=google.com; s=arc-20160816; b=A1yzGa1LIjVY6DCxdjqhwOIWmn2BVGgP8vTUyRMAFzyfBTEPCOhYGdY9En4UULj25M 5/LzNuJ3qvzpx5HsE9QNXb59WZgrRBbL66P++wyZwwlIlTGGFNwH6q2yul+deBjD3Kv9 CtY17+4b6JJ2OHT/F8Wd1m6fJ4CciSjQtB7G2GmnXkRUVbFdWf/akD8H6yTPDr8pr70d ootBQGjPKAtcTZQIX5lR5+yz/CL+t5Y8d4oKmot4gPmgFmLRzkLVKwu7S+LwbSM25ZeM RPW3mNsQ1MAwb1O5D4vXzoO1LDQFm9IyD4VbJWmErKXgVURQNh5xQO5MOt14oRJVYNQO gAmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=dWJjtSQpUhBAXT6+8/40Sc3M2EBjuIIxT3fafFg6uEg=; b=s8+1qYGuxBiYCxLCrvJ44rTfpQbjgfBPcYpIkizj1XV452MyY+eXbzJ0Sdc5eLOO2R xIf44cKJ3LwzT6ZG2nzwqtxU7ZvhPgGjKlSEi/ZmEfRcp97XGIbBinpmZeGA85hymgHm 6tXLxCxiUh7vq49fXEBOn33NGlmMntCik9G1OMt7sStoQmiBYDYBttszXtX05ZaUkG1D GSMf5o5pALcooSgREa3SVebjNLg6yRT8DU2KOCuqGlu1+XV53thb8+1qBztL/OFSLdRm IWU692eAF+xBG0u65XZEpEX4L4ibDan0yAbhVqsX2xAnXtqcqo3jtTFhaVD42ht9qExq V/Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=YVOeN9Pa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj11-v6si12436661plb.480.2018.05.02.14.56.49; Wed, 02 May 2018 14:57:03 -0700 (PDT) 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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=YVOeN9Pa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751763AbeEBV4d (ORCPT + 99 others); Wed, 2 May 2018 17:56:33 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:50596 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532AbeEBV4c (ORCPT ); Wed, 2 May 2018 17:56:32 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w42LpBfc016612; Wed, 2 May 2018 21:55:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=dWJjtSQpUhBAXT6+8/40Sc3M2EBjuIIxT3fafFg6uEg=; b=YVOeN9PabY/1e97D5vRH+PplDhQTHrodJzFNibF8/xJskYB6GY7ehJ0OW+F9wBsKBsHZ SPkXPUXV2DGTEOId8redX2NCNlz08WmRFlmSiRI5Q+bOYdnE15uCibVpY4qAgibT6/qW UDZQIiZCkGPm55A6pmnslGZFm22nMvyEXjaUmmrf5To5HhPMu8w42rJz32PQ/kQRgiSc 0o1HzxZFXp+AdrDs+4zaDLOqcU5DKZeB37TZsr9ZKp71NuZHAwjHjyYghO5V3aT4/q1b 1PJ2TZnKJZC4loD30Az74NckORQFlv3HMu1LGJXzsMoyUPRR4Pc22SS53e0xna8892WP dg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2hmhmfq4p7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 May 2018 21:55:56 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w42LttvA024709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 May 2018 21:55:55 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w42LtsW7026655; Wed, 2 May 2018 21:55:54 GMT Received: from [10.132.91.87] (/10.132.91.87) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 02 May 2018 14:55:54 -0700 Subject: Re: [PATCH 1/3] sched: remove select_idle_core() for scalability To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, daniel.lezcano@linaro.org, steven.sistare@oracle.com, dhaval.giani@oracle.com, rohit.k.jain@oracle.com References: <20180424004116.28151-1-subhra.mazumdar@oracle.com> <20180424004116.28151-2-subhra.mazumdar@oracle.com> <20180424124621.GQ4082@hirez.programming.kicks-ass.net> <20180425174909.GB4043@hirez.programming.kicks-ass.net> <20180501180348.GI12217@hirez.programming.kicks-ass.net> From: Subhra Mazumdar Message-ID: <1ea04602-041a-5b90-eba9-c20c7e98c92e@oracle.com> Date: Wed, 2 May 2018 14:58:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180501180348.GI12217@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8881 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=939 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805020182 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/01/2018 11:03 AM, Peter Zijlstra wrote: > On Mon, Apr 30, 2018 at 04:38:42PM -0700, Subhra Mazumdar wrote: >> I also noticed a possible bug later in the merge code. Shouldn't it be: >> >> if (busy < best_busy) { >>         best_busy = busy; >>         best_cpu = first_idle; >> } > Uhh, quite. I did say it was completely untested, but yes.. /me dons the > brown paper bag. I re-ran the test after fixing that bug but still get similar regressions for hackbench, while similar improvements on Uperf. I didn't re-run the Oracle DB tests but my guess is it will show similar improvement. merge: Hackbench process on 2 socket, 44 core and 88 threads Intel x86 machine (lower is better): groups  baseline       %stdev  patch %stdev 1       0.5742         21.13   0.5131 (10.64%) 4.11 2       0.5776         7.87    0.5387 (6.73%) 2.39 4       0.9578         1.12    1.0549 (-10.14%) 0.85 8       1.7018         1.35    1.8516 (-8.8%) 1.56 16      2.9955         1.36    3.2466 (-8.38%) 0.42 32      5.4354         0.59    5.7738 (-6.23%) 0.38 Uperf pingpong on 2 socket, 44 core and 88 threads Intel x86 machine with message size = 8k (higher is better): threads baseline        %stdev  patch %stdev 8       49.47           0.35    51.1 (3.29%) 0.13 16      95.28           0.77    98.45 (3.33%) 0.61 32      156.77          1.17    170.97 (9.06%) 5.62 48      193.24          0.22    245.89 (27.25%) 7.26 64      216.21          9.33    316.43 (46.35%) 0.37 128     379.62          10.29   337.85 (-11%) 3.68 I tried using the next_cpu technique with the merge but didn't help. I am open to suggestions. merge + next_cpu: Hackbench process on 2 socket, 44 core and 88 threads Intel x86 machine (lower is better): groups  baseline       %stdev  patch %stdev 1       0.5742         21.13   0.5107 (11.06%) 6.35 2       0.5776         7.87    0.5917 (-2.44%) 11.16 4       0.9578         1.12    1.0761 (-12.35%) 1.1 8       1.7018         1.35    1.8748 (-10.17%) 0.8 16      2.9955         1.36    3.2419 (-8.23%) 0.43 32      5.4354         0.59    5.6958 (-4.79%) 0.58 Uperf pingpong on 2 socket, 44 core and 88 threads Intel x86 machine with message size = 8k (higher is better): threads baseline        %stdev  patch %stdev 8       49.47           0.35    51.65 (4.41%) 0.26 16      95.28           0.77    99.8 (4.75%) 1.1 32      156.77          1.17    168.37 (7.4%) 0.6 48      193.24          0.22    228.8 (18.4%) 1.75 64      216.21          9.33    287.11 (32.79%) 10.82 128     379.62          10.29   346.22 (-8.8%) 4.7 Finally there was earlier suggestion by Peter in select_task_rq_fair to transpose the cpu offset that I had tried earlier but also regressed on hackbench. Just wanted to mention that so we have closure on that. transpose cpu offset in select_task_rq_fair: Hackbench process on 2 socket, 44 core and 88 threads Intel x86 machine (lower is better): groups  baseline       %stdev  patch %stdev 1       0.5742         21.13   0.5251 (8.55%) 2.57 2       0.5776         7.87    0.5471 (5.28%) 11 4       0.9578         1.12    1.0148 (-5.95%) 1.97 8       1.7018         1.35    1.798 (-5.65%) 0.97 16      2.9955         1.36    3.088 (-3.09%) 2.7 32      5.4354         0.59    5.2815 (2.8%) 1.26