Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1329832imu; Mon, 5 Nov 2018 18:49:40 -0800 (PST) X-Google-Smtp-Source: AJdET5cObavTg9n57fWsEJ4d9vOoZ0MirM7EPG9K7bJgrJvRgHbh0wKsxynVCrkg+xK1jV1Ag9YE X-Received: by 2002:a17:902:aa0a:: with SMTP id be10-v6mr24733805plb.294.1541472580474; Mon, 05 Nov 2018 18:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541472580; cv=none; d=google.com; s=arc-20160816; b=TwYxsMTGTqrGi8TVAOEnoDEfLPD0nGuiGjeuOvfjgiKL7PZtfhYCqWRltYcKWAeqHP rKibV6qr1pki3JGGnHxqFhkGVrWPghUdww4tcTfdUOxaIdqGHMEO4sNthp4JiHf5jJYT Vznd2u6KkrlPjg72hp4kCajXBicbK4B16HFSxSIOrt/5ODVD7h0vZOETGd33F3TZrdqi 9D4xzFVaDUFesKgrqwlzMofjQVfBqWEdn6uyh4weRNDExk9JkViuMGkWPowCLu7ieLls M6qHRTsHP5YiCWFBEyooEbKv+1TY2oDZ5O9aPCTQdqORFBnf0Rc3j5foev/AL4ZiL6Wo glkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=tWkkQcZrAQ+wJOwImR/zGkx9g74e2a16z7gakG/CuyQ=; b=gv7AFLhZHbNxSCh7RhGNoULNeCmOVCXM9uleVeBZasRBaWAGo/FXQ6oRC3kwGqeUPO mQsvTsaj4yW5tVL5rluda7u5XYFvvXXPcuET1Vm5TqzkK/JvM3Ay1pskttEGvq+czVnM 2z2D0HD61Sq9ZBIP1IpMVEz7ssIG71P5H80KeE2oKxeTGHGPszt2k/XHDPgCm5U6jlax //aH5uuTu9g7j10OljKeZrP8Qsna7E/am+kLeq9ZHmepsDiwp++a/30OJ0RRCvnaJrqO T60oPYaOWQRWVkaIGKM41gdvZYwJPgSKBPho/t/CJIQXEXGmp4aMCMZUbMNUpMWc/Npc hqkA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si14148131pgm.586.2018.11.05.18.49.24; Mon, 05 Nov 2018 18:49:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729641AbeKFMLz (ORCPT + 99 others); Tue, 6 Nov 2018 07:11:55 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:42616 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727448AbeKFMLx (ORCPT ); Tue, 6 Nov 2018 07:11:53 -0500 Received: by mail-qk1-f193.google.com with SMTP id u68so17575901qkg.9 for ; Mon, 05 Nov 2018 18:48:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=tWkkQcZrAQ+wJOwImR/zGkx9g74e2a16z7gakG/CuyQ=; b=iVnJDPcFM0C2fpS7voG+MQ8b0iw4LwGJbXcW31hAGjPcBXQMsgGoZGnhC4zFT0rn5Y IgmNJk5nK5NwYb01JQU91DfTAhPJ8fk34dKNecjOJzi+o0PJEgL86i9qXNMWiqbllx3I LYVlmVGDlH2UAy+XsFOhRQ1AQcwCswSPubkkHGKGg4/rZT6j8sg0Tjfxw/uxTcvMAYQU OEV7fm936W31GI0P+F4MM3onJwkExRFGpR5vY0rq0KJswgPEXyUxK9HQvhpj6gPs2BVb 3OmU4gjyPs50rkdOGlkx+ltk79Z1qZ7KuXyOSzpI92+jc35yhrFHnfJwL2egerp2NjIo 59lw== X-Gm-Message-State: AGRZ1gLtwsb/bzFvVJ/aGR0k61MfEX60FoIxz+eknGCyCIcPdsmZk0Su dUcGSjfBgIPdT4hQdmcDIkzphA== X-Received: by 2002:a37:c304:: with SMTP id a4mr23335701qkj.269.1541472538820; Mon, 05 Nov 2018 18:48:58 -0800 (PST) Received: from [192.168.1.153] (pool-173-54-33-167.nwrknj.fios.verizon.net. [173.54.33.167]) by smtp.gmail.com with ESMTPSA id d78sm7210813qke.94.2018.11.05.18.48.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 18:48:57 -0800 (PST) From: "Zi Yan" To: "Daniel Jordan" Cc: linux-mm@kvack.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, aarcange@redhat.com, aaron.lu@intel.com, akpm@linux-foundation.org, alex.williamson@redhat.com, bsd@redhat.com, darrick.wong@oracle.com, dave.hansen@linux.intel.com, jgg@mellanox.com, jwadams@google.com, jiangshanlai@gmail.com, mhocko@kernel.org, mike.kravetz@oracle.com, Pavel.Tatashin@microsoft.com, prasad.singamsetty@oracle.com, rdunlap@infradead.org, steven.sistare@oracle.com, tim.c.chen@intel.com, tj@kernel.org, vbabka@suse.cz Subject: Re: [RFC PATCH v4 00/13] ktask: multithread CPU-intensive kernel work Date: Mon, 05 Nov 2018 21:48:56 -0500 X-Mailer: MailMate (1.12.1r5552) Message-ID: <7E53DD63-4955-480D-8C0D-EB07E4FF011B@cs.rutgers.edu> In-Reply-To: <20181106022024.ndn377ze6xljsxkb@ca-dmjordan1.us.oracle.com> References: <20181105165558.11698-1-daniel.m.jordan@oracle.com> <20181106022024.ndn377ze6xljsxkb@ca-dmjordan1.us.oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_281B8E86-991E-4CD5-A12E-8C9D4D81AEF5_="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_281B8E86-991E-4CD5-A12E-8C9D4D81AEF5_= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5 Nov 2018, at 21:20, Daniel Jordan wrote: > Hi Zi, > > On Mon, Nov 05, 2018 at 01:49:14PM -0500, Zi Yan wrote: >> On 5 Nov 2018, at 11:55, Daniel Jordan wrote: >> >> Do you think if it makes sense to use ktask for huge page migration (t= he data >> copy part)? > > It certainly could. > >> I did some experiments back in 2016[1], which showed that migrating on= e 2MB page >> with 8 threads could achieve 2.8x throughput of the existing single-th= readed method. >> The problem with my parallel page migration patchset at that time was = that it >> has no CPU-utilization awareness, which is solved by your patches now.= > > Did you run with fewer than 8 threads? I'd want a bigger speedup than = 2.8x for > 8, and a smaller thread count might improve thread utilization. Yes. When migrating one 2MB THP with migrate_pages() system call on a two= -socket server with 2 E5-2650 v3 CPUs (10 cores per socket) across two sockets, here are= the page migration throughput numbers: throughput factor 1 thread 2.15 GB/s 1x 2 threads 3.05 GB/s 1.42x 4 threads 4.50 GB/s 2.09x 8 threads 5.98 GB/s 2.78x > > It would be nice to multithread at a higher granularity than 2M, too: a= range > of THPs might also perform better than a single page. Sure. But the kernel currently does not copy multiple pages altogether ev= en if a range of THPs is migrated. Page copy function is interleaved with page table op= erations for every single page. I also did some study and modified the kernel to improve this, which I ca= lled concurrent page migration in https://lwn.net/Articles/714991/. It further= improves page migration throughput. =E2=80=94 Best Regards, Yan Zi --=_MailMate_281B8E86-991E-4CD5-A12E-8C9D4D81AEF5_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQFKBAEBCgA0FiEEOXBxLIohamfZUwd5QYsvEZxOpswFAlvhARgWHHppLnlhbkBj cy5ydXRnZXJzLmVkdQAKCRBBiy8RnE6mzGuXB/0ZamMyImDvdSAnu6bnRamwxFic UnxPMANlgt8DoHj33w6YPGNPvTLOpYT/23z3PC+p+GSE//6OBGlh92xBYALyynHf MXdJ/VQPIC0HN8HrUyk5o9UzKDf4v6GJkJb29M0E2wA+XmOj8QOsQ0Hvxeyd7jA0 PAusVkLka9cnSJnACY7qqS7ybirJWeFcPFZx7hOH9U+I7kpwUQMBczv4Mx3ZWX5U tOF2zTek/bglTVulJZwEm14d7iauZ4FqFQqMVobjSGnhvRvIDq4iJeAw4DaitBd4 e4KUl42KBLZ0Itat+o1uMmKfu4NQF2sXvmhhj+VSIvgs+3HlW//qixG+yDOS =5hII -----END PGP SIGNATURE----- --=_MailMate_281B8E86-991E-4CD5-A12E-8C9D4D81AEF5_=--