Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4331388imm; Mon, 30 Jul 2018 12:37:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfzsF/46SUtudGDZ1IsoQGFFO46Ry6yfbrhUDgQG2xG5UmbYcR98p3kImsqwRl6qTvCbVSx X-Received: by 2002:a63:f657:: with SMTP id u23-v6mr8989300pgj.258.1532979438411; Mon, 30 Jul 2018 12:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532979438; cv=none; d=google.com; s=arc-20160816; b=TfNyVbZk3tdW9zkYjyf4hWveLJbZQikJtt+kupD2EYujOSB88CZLXc6r/vJ+6YLkat 7Ynb6zR/lRdeJdyOJP4xQgVpyvO6Qte4EXEsbBVJ7jm8y8FunIQthRHc0p1zZShcUXAE HWf3pUBc4KMbsYW/ANbWXiT8AqJJb1344IdX58Ovmb7po/poh2EKxudGMGnfOAVqN+6B P3ew79Tjcpnh5u7CQQMQt1dftbF69Ceh6Dvc12SFzNIfuVJP8Q/i4kvasXWLomii531I sLVTLPZrX9Ov94C7wUJTz3nLjtDIpACOsCzCBTnrIpgScEQuASEiwN3kijX5yWKNDXpE IC/Q== 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:date :cc:to:from:subject:message-id:arc-authentication-results; bh=FhtsjnFWRmYFivKqPGzEORjbqYBLc6+gIyaTuW6TdfE=; b=nV59OaSxSHVeU1C/44+HZUimjBCFCJDQZQJLsLF04azMY/EhG4fnnf5RdC1zPqfeRM Ip9VW1HhxL0p62NEvx7QnNZ3UXcm7GhK/O7s8pdACOExOsCiAzN/R2T/OzlRyaZ8wqkM PWTVqw8V4kS3KdkEHy4oqEfqai5BTu4XXosfl/XJn3EW0jH2F1KRHiIa7KVr+WjNYr3r K8YogcVLCQaS5WpsQ5HXdReV1alawcAmQUNlyG0xlR25YdC7T2J3mEKJQTBKgTJKT/0v u7QkWHCYZzllVjRJkLPNeV93ZWB3YtD3TBpCcbx1w+6+skfZZg+7GAR+OZcvQPnR0AVu i+Fw== 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 b74-v6si11827958pfd.273.2018.07.30.12.37.04; Mon, 30 Jul 2018 12:37:18 -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; 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 S1732045AbeG3VMp (ORCPT + 99 others); Mon, 30 Jul 2018 17:12:45 -0400 Received: from shelob.surriel.com ([96.67.55.147]:50314 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731852AbeG3VMo (ORCPT ); Mon, 30 Jul 2018 17:12:44 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fkDxg-0005BY-NM; Mon, 30 Jul 2018 15:36:08 -0400 Message-ID: <1532979368.28585.33.camel@surriel.com> Subject: Re: [PATCH v2 11/11] mm,sched: conditionally skip lazy TLB mm refcounting From: Rik van Riel To: Andy Lutomirski Cc: Peter Zijlstra , LKML , kernel-team , X86 ML , Vitaly Kuznetsov , Ingo Molnar , Mike Galbraith , Dave Hansen , Catalin Marinas , Benjamin Herrenschmidt Date: Mon, 30 Jul 2018 15:36:08 -0400 In-Reply-To: References: <20180728215357.3249-1-riel@surriel.com> <20180728215357.3249-11-riel@surriel.com> <20180729155452.37eddc11@imladris.surriel.com> <20180730095502.GG2494@hirez.programming.kicks-ass.net> <1532961011.28585.30.camel@surriel.com> <20180730162653.GM2494@hirez.programming.kicks-ass.net> <1532978146.28585.32.camel@surriel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-TQJ0OGlnMeltqnHFvU/U" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-TQJ0OGlnMeltqnHFvU/U Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2018-07-30 at 12:30 -0700, Andy Lutomirski wrote: > On Mon, Jul 30, 2018 at 12:15 PM, Rik van Riel > wrote: > > On Mon, 2018-07-30 at 18:26 +0200, Peter Zijlstra wrote: > > > On Mon, Jul 30, 2018 at 10:30:11AM -0400, Rik van Riel wrote: > > >=20 > > > > > What happened to the rework I did there? That not only > > > > > avoided > > > > > fiddling > > > > > with active_mm, but also avoids grab/drop cycles for the > > > > > other > > > > > architectures when doing task->kthread->kthread->task things. > > > >=20 > > > > I don't think I saw that. I only saw your email from > > > > July 20th with this fragment of code, which does not > > > > appear to avoid the grab/drop cycles, and still fiddles > > > > with active_mm: > > >=20 > > > Yeah, that's it. Note how it doesn't do a grab+drop for kernel- > > > > kernel, > > >=20 > > > where the current could would have. > > >=20 > > > And also note that it only fiddles with active_mm if it does the > > > grab+drop thing (the below should have s/ifdef/ifndef/ to make > > > more > > > sense maybe). > >=20 > > I'll kick off a test with your variant. I don't think we > > will see any performance difference on x86 (due to not > > using a refcount at all any more), but unless Ingo is in > > a hurry I guess there's no issue rewriting this part of > > the patch series :) > >=20 > > Do the other patches look ok to you and Andy? > >=20 >=20 > The whole series other than the active_mm stuff looked okay to me. Does the active_mm stuff look like a step in the right direction with the bugfix, or would you prefer the code to go in an entirely different direction? If this looks like a step in the right direction, it may make sense to make this step before the merge window opens, and continue with more patches in this direction later. --=20 All Rights Reversed. --=-TQJ0OGlnMeltqnHFvU/U Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAltfaKgACgkQznnekoTE 3oPtRggAuIs0YWwDPWVIsj60RvX4pIOazfD/ytxipbJlBH3ksLL1fRqX/+aUdFMB pcFapRCwjY0W5TLBFIUeFBKumoTfvCiz0bwV0Gm8UiBqNptU/8ZzLSUMMRdCwCgK Ybtf2nshq3leVtKfqnBPsTDZVZoN+aqbxWXJSLfEsJOqQwE9M/q50CAf9P4penG1 z4P2balb9uP96zazYwJgcYqVzDR4lFs1TYmn9VUYZLjOODwW0XB8hOD6PITfV9da DT11vX7VOUiX94f6VbbS5OvT61rr1UORGzi/NJPBdQaQjP/XhETe/2TbUUL66H4D hckch9sbrw5Oo6O3FoA7V/Jb5TK5RA== =k4tB -----END PGP SIGNATURE----- --=-TQJ0OGlnMeltqnHFvU/U--