From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, T_DKIMWL_WL_HIGH autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97882C04A6B for ; Wed, 8 May 2019 18:26:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C976216C4 for ; Wed, 8 May 2019 18:26:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ERC/n8eQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728251AbfEHS0r (ORCPT ); Wed, 8 May 2019 14:26:47 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:42108 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728015AbfEHS0q (ORCPT ); Wed, 8 May 2019 14:26:46 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x48INgMl029049; Wed, 8 May 2019 18:25:48 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-2018-07-02; bh=xsNUcAWdL76XvZcF2jqEaUnZP2wMaX+lRuNszc20Pno=; b=ERC/n8eQ1DLhQ5Rmjjm7sLviBekPwac1KKFc3Xvuxy2TT94foN1otafHDVMiSxmmx5S5 yynxKM+rN5U5CXGEuWp5kT6xovwrifbrCJ2IdPi+NmspV/iDEX/A2tOflOuW+pcMBCPb /PQyb4IU8Ky/MlUqGPc5a/WNpLZnDP+Y0wmUAE4kWRTdiropJjdnII8ijsXJB5AGWtpU vWe/2/lYhIRrmHUs0wr8SRNX8msJOaQ/MbtSKqcQc56iOZ8TiuJKmIck1h1i+XloNS+y VY1I7nXE6EXcSl3masce8IOEKtfO8se3ypmZr1K0o8+C/oPj/E3Ss5Q0UYGeaWqEogXQ iQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2s94bg60fa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 08 May 2019 18:25:48 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x48INH8k132122; Wed, 8 May 2019 18:23:47 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2s94ba9s0g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 08 May 2019 18:23:47 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x48INfSr002295; Wed, 8 May 2019 18:23:41 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:23:41 -0700 Subject: Re: [RFC PATCH v2 11/17] sched: Basic tracking of matching tasks 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> From: Subhra Mazumdar Message-ID: Date: Wed, 8 May 2019 11:19:46 -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-1905080112 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-1905080112 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.