Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5377714yba; Wed, 8 May 2019 12:17:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMlRQBHsQf7rFGUR08FEHwCxhLaeidV+kM4KqanyNUwUNNE+kzdiBAWAEz45gfd/aDVu9A X-Received: by 2002:a63:4c55:: with SMTP id m21mr41929356pgl.66.1557343022574; Wed, 08 May 2019 12:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557343022; cv=none; d=google.com; s=arc-20160816; b=hS2oWnjNDhTzf/WAJXnetaTXYSUeh9azGabjFp26nKKiRywghKh7rhL+NiLhaCW8YH MWrgk0BXpfeQa3ohzTdWWD+QbdJBCaLCEiLe8TRNyAyihOMdkvCweGY7dknKNPWDDQO3 1Ny/KClePZb7y/3/6FtSVBbcyv+H3Se8I5EvtQIZmYfes385bk5Z9OcfUSGoNnVc1dzC WwU+hzR+dGLY01G+fhPumydLNoW5KcjDiD4DPmq9l4GwxXiQ8+inyr7DWTssl38uZdn4 yn89Vr8cLnkiJLMaTWSNqXgRFneX5v6h6vVSWB82MTSt82Yr3KpniDmnDG1LdnFVsL/+ a33g== 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:references:cc:to:from:subject:dkim-signature; bh=uGWYm/aUXIQX70DcFxESw4cgkt3OUFJZRMcNw/SQoyo=; b=QCdxs85BDr0Ouv0WxB2BPPDNQp9wWYlxv16chbMBcz7GE+jMkVcXK2wsN1Qqc8wAqY uRio3jiGsRjmreguhrWjuMqrpaLSEadztVxfO16zqPSsstEPTK52RcjXRXduRgMVepfQ SBaEIG+bhKeCmhTEpe/w3nhNOa2yF7q5WzMG778nwQR33fmn6Tlr/vcqOXKKqBMtWpgt gmye58Fl3A5CdlkCCC628S3lmZv+sxRtfv18ZBhoxF1KWdPiLA1kRuGkRBntLqD3Rg4e azoM8RN2O+l/QzJRj8VNLzOZz6EOvRBGIDvI1YEhbveCDbXPvBIZlnav0uJmEs3w13iU gm1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=JlAmQv8A; 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 s7si24124500pgr.287.2019.05.08.12.16.44; Wed, 08 May 2019 12:17:02 -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-2018-07-02 header.b=JlAmQv8A; 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 S1728535AbfEHSnL (ORCPT + 99 others); Wed, 8 May 2019 14:43:11 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:55456 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725910AbfEHSnK (ORCPT ); Wed, 8 May 2019 14:43:10 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x48IXdtm057067; Wed, 8 May 2019 18:41:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : references : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=uGWYm/aUXIQX70DcFxESw4cgkt3OUFJZRMcNw/SQoyo=; b=JlAmQv8A8r76XAAKM7LJS03w0XGc8beDrd6ZwahO/Qa44eTB6fAi5dCzuXp81kxOgR1e nteKz+jUzM9Dv+S7RyYh5VrqBduMCX++mpaximUkBgNOA4XUKwMLjc3HjBozSgW27vTd diJEG+oE6hkJiQc8EpydlYWgtUnpVAcNPP+GXvc7vHvz1hq6swPPv/6oe4nHKcx+w/gw iJVIBYEcMY6kKCTKH7sLmn01i6jn1j8cyLTejHuEZprF3G5Qif99rsOgSV+SMbXh+tSb oTV6tpDoPKaYSGHzz91yW7I69cAiJ+wEtfB6J5mJK46NxaC2ldP+hk5B/MR1FqyjV0sN QQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2s94b0x3gp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 08 May 2019 18:41:23 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x48IfMYH162097; Wed, 8 May 2019 18:41:22 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2s94aga53g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 08 May 2019 18:41:22 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x48IfGkZ029544; Wed, 8 May 2019 18:41:16 GMT Received: from [10.132.91.213] (/10.132.91.213) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 08 May 2019 11:41:15 -0700 Subject: Re: [RFC PATCH v2 11/17] sched: Basic tracking of matching tasks From: Subhra Mazumdar To: Aubrey Li , Tim Chen Cc: Aaron Lu , Vineeth Remanan Pillai , Nishanth Aravamudan , Julien Desfossez , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Kees Cook , Greg Kerr , Phil Auld , Aaron Lu , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini References: <2364f2b65bf50826d881c84d7634b6565dfee527.1556025155.git.vpillai@digitalocean.com> <20190429061516.GA9796@aaronlu> <6dfc392f-e24b-e641-2f7d-f336a90415fa@linux.intel.com> <777b7674-4811-dac4-17df-29bd028d6b26@linux.intel.com> Message-ID: <28fb6854-2772-5d29-087a-6a0cf6afe626@oracle.com> Date: Wed, 8 May 2019 11:37:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9251 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905080113 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9251 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905080113 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/8/19 11:19 AM, Subhra Mazumdar wrote: > > On 5/8/19 8:49 AM, Aubrey Li wrote: >>> Pawan ran an experiment setting up 2 VMs, with one VM doing a >>> parallel kernel build and one VM doing sysbench, >>> limiting both VMs to run on 16 cpu threads (8 physical cores), with >>> 8 vcpu for each VM. >>> Making the fix did improve kernel build time by 7%. >> I'm gonna agree with the patch below, but just wonder if the testing >> result is consistent, >> as I didn't see any improvement in my testing environment. >> >> IIUC, from the code behavior, especially for 2 VMs case(only 2 >> different cookies), the >> per-rq rb tree unlikely has nodes with different cookies, that is, all >> the nodes on this >> tree should have the same cookie, so: >> - if the parameter cookie is equal to the rb tree cookie, we meet a >> match and go the >> third branch >> - else, no matter we go left or right, we can't find a match, and >> we'll return idle thread >> finally. >> >> Please correct me if I was wrong. >> >> Thanks, >> -Aubrey > This is searching in the per core rb tree (rq->core_tree) which can have > 2 different cookies. But having said that, even I didn't see any > improvement with the patch for my DB test case. But logically it is > correct. > Ah, my bad. It is per rq. But still can have 2 different cookies. Not sure why you think it is unlikely?