Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5212966ybl; Tue, 4 Feb 2020 09:41:06 -0800 (PST) X-Google-Smtp-Source: APXvYqydYiasD64/BOOw4Dd/vGvlYylLaTomESHk+dsnp/e8MmmzQk6BEEPbWEt+wOj+ioV6ey0E X-Received: by 2002:aca:5844:: with SMTP id m65mr132016oib.136.1580838066252; Tue, 04 Feb 2020 09:41:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580838066; cv=none; d=google.com; s=arc-20160816; b=UJKqgWnFW57h3iJWp4pebsp/8ilP7G2AlctKe04dbD/jTQwQ8JWfwqsTQ9rh1PdVD/ /K7O1y8gsjNWgeaVFX/QTTCabvwT4j7mr322DsKHYaFKzfH/eyZqncYFoB5m4zB27ywU miJxfOY1obSBRQWmAbC4mISvMkDzKLme+sRevTQzx4tZhGMSfbRQmqhaEmYdnllMNG3K bGvqLureyKEQpAzA3I3quKNQ1s5FxoRb00vRB8pWRWIW3yxPKKsp8dY3s9HBhWHimgQ5 ckOK+LpTuOpcBt2vj5PlOAeaX0oOZHt0pSUwrgDTk07I6FaFPVpIQuw/uerwVYv5Ka3k D45A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=rOt4Q7Y7NbeoLNOkgoGRXQ71dvuW8UbbyvbNZ5N5pIs=; b=FHFlW+KZ63q3XezJLcBA4+sKk5fz0sZnOd447D/Daj0+xfxyLVXUWm8T5tZKxuwWLg Jk9VmkGlulydCJNjhcKAQ/MK11wPRPVICTJmjCeznGgkjX89dB3czuvRQ3Om1YIleKWf dny55iF47I1UF/Bh9S0Ws2idjkDriJrzsLqwwBkEup70yUlkTyAy9nPbmsGD2TKvKLD0 VUPqT2wFj9tFncDH+N08OtVY0Pxi92Ws9JpbYW7WeYk8qt8Nak9FXNnYv5+xQ0PnNjFv cUhk5COhXRnZDhJk1LkTVTf9HorFaFwquoLq9HfqrK75ivXvDdiygg3ck+gtnfQU31M7 C6Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UBiHX1t+; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a28si14482193otd.257.2020.02.04.09.40.53; Tue, 04 Feb 2020 09:41:06 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=UBiHX1t+; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727456AbgBDRjk (ORCPT + 99 others); Tue, 4 Feb 2020 12:39:40 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:26421 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727382AbgBDRjk (ORCPT ); Tue, 4 Feb 2020 12:39:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580837978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rOt4Q7Y7NbeoLNOkgoGRXQ71dvuW8UbbyvbNZ5N5pIs=; b=UBiHX1t+4ROu0VQf6U/i5XkZvi1+z9soqjU5GuTxQf8REepOUjIcsdIGitFmQ0zxD1/4RW 3PSGbMjR4AGs0DdDlYFA1ohVxEY2NAuDZseKHcF6jmH8r12Zn1Xa2PUmZsWOv5I7jJqdAM 0uFcMFoxSso9ciRpF9dzeEfeUTkyA8Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-233-RFdFYVoNOtmfFcl0m6Qxsg-1; Tue, 04 Feb 2020 12:39:36 -0500 X-MC-Unique: RFdFYVoNOtmfFcl0m6Qxsg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE0AADB25; Tue, 4 Feb 2020 17:39:33 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-59.bos.redhat.com [10.18.17.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 17A5660BF4; Tue, 4 Feb 2020 17:39:30 +0000 (UTC) Subject: Re: [PATCH v8 4/5] locking/qspinlock: Introduce starvation avoidance into CNA To: Peter Zijlstra , Alex Kogan Cc: linux@armlinux.org.uk, Ingo Molnar , Will Deacon , Arnd Bergmann , linux-arch@vger.kernel.org, linux-arm-kernel , linux-kernel@vger.kernel.org, Thomas Gleixner , Borislav Petkov , hpa@zytor.com, x86@kernel.org, Hanjun Guo , Jan Glauber , Steven Sistare , Daniel Jordan , dave.dice@oracle.com References: <8D3AFB47-B595-418C-9568-08780DDC58FF@oracle.com> <714892cd-d96f-4d41-ae8b-d7b7642a6e3c@redhat.com> <1669BFDE-A1A5-4ED8-B586-035460BBF68A@oracle.com> <20200125111931.GW11457@worktop.programming.kicks-ass.net> <20200203134540.GA14879@hirez.programming.kicks-ass.net> <6d11b22b-2fb5-7dea-f88b-b32f1576a5e0@redhat.com> <20200203152807.GK14914@hirez.programming.kicks-ass.net> <15fa978d-bd41-3ecb-83d5-896187e11244@redhat.com> <83762715-F68C-42DF-9B41-C4C48DF6762F@oracle.com> <20200204172758.GF14879@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: Date: Tue, 4 Feb 2020 12:39:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200204172758.GF14879@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/4/20 12:27 PM, Peter Zijlstra wrote: > On Tue, Feb 04, 2020 at 11:54:02AM -0500, Alex Kogan wrote: >>> On Feb 3, 2020, at 10:47 AM, Waiman Long wrote: >>> >>> On 2/3/20 10:28 AM, Peter Zijlstra wrote: >>>> On Mon, Feb 03, 2020 at 09:59:12AM -0500, Waiman Long wrote: >>>>> On 2/3/20 8:45 AM, Peter Zijlstra wrote: >>>>>> Presumably you have a workload where CNA is actually a win? That i= s, >>>>>> what inspired you to go down this road? Which actual kernel lock i= s so >>>>>> contended on NUMA machines that we need to do this? >> There are quite a few actually. files_struct.file_lock, file_lock_cont= ext.flc_lock >> and lockref.lock are some concrete examples that get very hot in will-= it-scale >> benchmarks.=20 > Right, that's all a variant of banging on the same resources across > nodes. I'm not sure there's anything fundamental we can fix there. > >> And then there are spinlocks in __futex_data.queues,=20 >> which get hot when applications have contended (pthread) locks =E2=80=94= =20 >> LevelDB is an example. > A numa aware rework of futexes has been on the todo list for years :/ Now, we are going to get that for free with this patchset:-) > >> Our initial motivation was based on an observation that kernel qspinlo= ck is not=20 >> NUMA-aware. So what, you may ask. Much like people realized in the pas= t that >> global spinning is bad for performance, and they switched from ticket = lock to >> locks with local spinning (e.g., MCS), I think everyone would agree th= ese days that >> bouncing a lock (and cache lines in general) across numa nodes is simi= larly bad. >> And as CNA demonstrates, we are easily leaving 2-3x speedups on the ta= ble by >> doing just that with the current qspinlock. > Actual benchmarks with performance numbers are required. It helps > motivate the patches as well as gives reviewers clues on how to > reproduce / inspect the claims made. > I think the cover-letter does have some benchmark results listed.=C2=A0 A= re you saying that some benchmark results should be put into individual patches themselves? Cheers, Longman