Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1174744imm; Fri, 15 Jun 2018 12:28:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJAQIcJFePsNvtOnn3Thxa75F0W8JJgEjUGfDoWVFlyfCbNhVZLm30jNChIM7pUieWJ03hK X-Received: by 2002:a65:510c:: with SMTP id f12-v6mr2703406pgq.288.1529090898067; Fri, 15 Jun 2018 12:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529090898; cv=none; d=google.com; s=arc-20160816; b=lj5Et8ws5cqTF+AjMrrybB7v2GkWZCYW1oF7XEBCR2zoUfP7QFQ9CkUOsnn/8jZv/x J2oSjM2n5P8e/wYUcp1JJbTbjInPa9nDbQ3q/XzP1BkKLDmVsi2Gp/6sjI2T61n8BF7J WagDJcd4kEASnhVTwGhOqaUVMsbowdQeJWvADBu6HMk2zz/oBxMFQhOjP26DAN6u3/I/ kz34RBEBIY8nk8Rs35rf/rmqD7UxtukVDNrYf+uJzqvzVAWnndUDdavh8HW9vvU7P2EP qUCiOTrgFBCI9DjbzEjPldm3HJv0DkroCzJTJM14VLdxKn1m85EmipMzZkGFMiRAwJk7 GHgw== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=PkTgkeLe9oT/ZLXknwLsoE1ovTBx91Zc5MZXDWkYZ5g=; b=JbLTtiHIhSje0RiB3P2RYCqTj7hvyIsv1BWQSc/jiLgVXiOTO7gVzVQDK3hj+NCIGb P+lnjsFeWUetyAa2Ea7+LEH+8rjS1HfVpe8k7A6LskTs5NI1UvIZTnEZUlWi5dbR0GyB NKmhMonDg8d9V34vzSP+q7CxF6I+W5sgqi7upnGo0lmjFhf5+yXDD5KD7ipUqmcwPDr+ nKTSrUQm8eQRyXxNYZhWBpQZ7JLEDLI1Ig5bPxDNituhtsJMN/o17HK/RdZ/hWnkNTgo sXDTZqilg9xOCHJPyaX/UQKetgkTdV+PBDGGWVloUiUa1LEcZngLzrGgSCY9CWPAlvOL 2LbA== 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 y83-v6si8487149pfb.284.2018.06.15.12.28.03; Fri, 15 Jun 2018 12:28: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 S966063AbeFOT1j (ORCPT + 99 others); Fri, 15 Jun 2018 15:27:39 -0400 Received: from mail.bootlin.com ([62.4.15.54]:56055 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964930AbeFOT1i (ORCPT ); Fri, 15 Jun 2018 15:27:38 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 766B12079D; Fri, 15 Jun 2018 21:27:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from windsurf (LFbn-TOU-1-88-197.w86-201.abo.wanadoo.fr [86.201.177.197]) by mail.bootlin.com (Postfix) with ESMTPSA id 3C2AB206A0; Fri, 15 Jun 2018 21:27:26 +0200 (CEST) Date: Fri, 15 Jun 2018 21:27:26 +0200 From: Thomas Petazzoni To: Sergei Shtylyov Cc: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arch/sh: use slow path for get_user_pages_fast() on SMP Message-ID: <20180615212726.17d8ffe5@windsurf> In-Reply-To: <474bbdcc-d78f-faa0-b2c3-3650cc870b36@cogentembedded.com> References: <20180615155237.8166-1-thomas.petazzoni@bootlin.com> <474bbdcc-d78f-faa0-b2c3-3650cc870b36@cogentembedded.com> Organization: Bootlin (formerly Free Electrons) X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, 15 Jun 2018 19:04:45 +0300, Sergei Shtylyov wrote: > Hello! > > On 06/15/2018 06:52 PM, Thomas Petazzoni wrote: > > > The fast path of get_user_pages_fast() disables IRQs and then does: > > > > - gup_pud_range() > > - gup_pmd_range() > > - gup_pte_range() > > - flush_dcache_page() > > > > However, flush_dcache_page() makes a smp_call_function(), and using > > smp_call_function() when IRQs are disabled is not allowed. > > > > In order to work around this problem, this commit prevents the fast > > path from get_user_pages_fast() from being used on SMP, and directly > ^^^^ of? > Else it sounds a bit tautological... I re-read again my sentence, and I believe it's correct and it has the meaning I intended to give. Of course, I'm not a native english speaker, so I might be wrong on this :-) I'm actually more interested in hearing whether there is a better solution to this problem. This patch submission is really a very proposal, and I'm hoping to get some better suggestions on how to approach the problem. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com