Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp14220ybe; Wed, 4 Sep 2019 14:12:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyphUIyUWN9Zuyo1gQVmhusnjwjfkQwTwfJe73J4SW2Avp6787Cl3R5cDiSfC/Hpu++DYwm X-Received: by 2002:a17:902:bd87:: with SMTP id q7mr26466282pls.57.1567631568094; Wed, 04 Sep 2019 14:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567631568; cv=none; d=google.com; s=arc-20160816; b=v0amPSIA2NfSt+U1npoPNU9ElGFMu6flyUu0qhB5789ZFWSS9AQN7phGpKYj68+Gpt tRJaZwBUvqn9ofXLHA4LyMwarkGo3/9WQmAJEN4R5AnntCYQvOwXdaNvlS8FxmHdLjcq lhAXt2D9I0i3DJCLNDu7PrG/IyPHO/Yqt2D/IufDNeMeFLCPg51ljoQ9dxi9YP36oBNJ VtpdABbCZCXfP1iIsviVRhaEpQv2GpxqEHo9/lrMrKi7TCn+E1UJjTTzxjR44Kl4dCxo McP0K9jAb5UCUiD24bRn3ZKH9/DG1NdzP7i/Dr3cB4QK/GDEQdGfQnh95py+isXdj9ta yjDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wPMWwNSvV9eb5rCu0YMNtiK3/0cR200eFpdZP8tToms=; b=e9mIcueojQfZO1X1ktgcTGxPprzRF3MchJOEwejQwLPWWdk7L2yr/rGH+4vYOxiJaQ V7k1ODGEhK5iSNXSD7Y3fwPSNovu3dHAccERMhkXF6imLQmM6aw0u9I0aHrnGHyjCXeG KiMb/5BDnt4SWlQYbqL2gLVfdoI1QtVGJmG3QDveNU/sP3Fv+fmb95A8B0O9ALMP35ja q3+M3M1EWQ8OBkqpfXW7Y7RwBvvf4v0UHbDQUJj1eEXEJ4Am4tUIqNWNgiVFYgQvnNE2 eq93iAmPTZTxu94qQeIikNyO1kw7itFnf3tUnGQ5FL1RSPwSdPoNv9/TWU9ZEDEQ4dHp i4uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="cr/2pcTa"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si165705pjs.13.2019.09.04.14.12.28; Wed, 04 Sep 2019 14:12:48 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="cr/2pcTa"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730603AbfIDVK3 (ORCPT + 99 others); Wed, 4 Sep 2019 17:10:29 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:42113 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730257AbfIDVK2 (ORCPT ); Wed, 4 Sep 2019 17:10:28 -0400 Received: by mail-ot1-f67.google.com with SMTP id c10so10782449otd.9 for ; Wed, 04 Sep 2019 14:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wPMWwNSvV9eb5rCu0YMNtiK3/0cR200eFpdZP8tToms=; b=cr/2pcTab+KUWoDNVNzO2zJ+8zFyfJbc3u75JTwJU8kJ7gWl3gxzG5ENnPPSyVrSCq SuBqAQ8RzhaV2a/HxduSt7ppLV/eWGTtUx/a6wNjIODvqE88o+7S1ZWGc6I6GW/lWSco ugSco9IMYbUbbhVhb7LB51QAUisJGNylBc2XTRY+ofuMS4mtW7yB+nBDwcC8Eflg+DIh C47efgC6cD78+M5RvB3gTx+JoWSmjAvaaa2GqDhJjsgLFt59c15hiEh1Ur3QDfAToi1y ZJezHfiZrelD2BcNYDQu3jmZ72RSuDo/vns5bY+ZuJ10WxhXfVOcTURaAUZLAfLH4A1T NulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wPMWwNSvV9eb5rCu0YMNtiK3/0cR200eFpdZP8tToms=; b=KF/vooN5G7sszytf/GpgSxbqWEKEQenr/0pHizS+zGxXPMoKjb5QLbWkuRv1CbrG4u 1mFIXQMPibmOSyYcd1cOVPNXCMEZXcx7T2Vn+ulsP9GgiPfV0+x3Jb07ElBgOF9/qTIx /cNNaz7xR9VdhjBM1AuF6a/pI0wYUd97Je+6h43ROIIcukOwuK0Q8PXueJPl3peq12m3 v0TdJg3uL8iARGgxWxGoblvU5qMVnrib3JF4xu5WEC22Jj8/MnoZrNUYNP8Cwwp+MlX/ 04RIuVPU/O3exNTv0NNpY0EYWdLDMKrEnEF27Jnceg7ZLOQOmQm/Dim5MvyB0YUuDntA pK5w== X-Gm-Message-State: APjAAAVuBjICYnmXKRuy+Us7flmENZNQsTaZqtlLOZoBuGClE0QNGbHk 1Q+mgLC8LtqO9buMEHIbMTh2W8Srx6MRculves0Cwg== X-Received: by 2002:a9d:6d15:: with SMTP id o21mr9381251otp.363.1567631427871; Wed, 04 Sep 2019 14:10:27 -0700 (PDT) MIME-Version: 1.0 References: <20190904150920.13848.32271.stgit@localhost.localdomain> <20190904151030.13848.25822.stgit@localhost.localdomain> In-Reply-To: <20190904151030.13848.25822.stgit@localhost.localdomain> From: Dan Williams Date: Wed, 4 Sep 2019 14:10:17 -0700 Message-ID: Subject: Re: [PATCH v7 1/6] mm: Adjust shuffle code to allow for future coalescing To: Alexander Duyck Cc: nitesh@redhat.com, KVM list , "Michael S. Tsirkin" , David Hildenbrand , Dave Hansen , Linux Kernel Mailing List , Matthew Wilcox , Michal Hocko , Linux MM , Andrew Morton , virtio-dev@lists.oasis-open.org, Oscar Salvador , yang.zhang.wz@gmail.com, Pankaj Gupta , Rik van Riel , Konrad Rzeszutek Wilk , lcapitulino@redhat.com, "Wang, Wei W" , Andrea Arcangeli , Paolo Bonzini , Alexander Duyck Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 4, 2019 at 8:10 AM Alexander Duyck wrote: > > From: Alexander Duyck > > Move the head/tail adding logic out of the shuffle code and into the > __free_one_page function since ultimately that is where it is really > needed anyway. By doing this we should be able to reduce the overhead > and can consolidate all of the list addition bits in one spot. > > While changing out the code I also opted to go for a bit more thread safe > approach to getting the boolean value. This way we can avoid possible cache > line bouncing of the batched entropy between CPUs. The original version of this patch just did the movement, but now the patch also does the percpu optimization. At this point it warrants being split into a "move" patch and then "rework". Otherwise the bulk of the patch is not really well described by the patch title. With the split there's a commit id for each of the performance improvement claims. Other than that the percpu logic changes look good to me.