From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14702CA9EA0 for ; Tue, 22 Oct 2019 17:53:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D242420B7C for ; Tue, 22 Oct 2019 17:53:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="f/jyi7Fo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D242420B7C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 71C5A6B0005; Tue, 22 Oct 2019 13:53:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CD4E6B0006; Tue, 22 Oct 2019 13:53:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BB7A6B0007; Tue, 22 Oct 2019 13:53:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0047.hostedemail.com [216.40.44.47]) by kanga.kvack.org (Postfix) with ESMTP id 3BD2B6B0005 for ; Tue, 22 Oct 2019 13:53:08 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id D52F0181AF5C1 for ; Tue, 22 Oct 2019 17:53:07 +0000 (UTC) X-FDA: 76072166814.19.blade38_7299853238409 X-HE-Tag: blade38_7299853238409 X-Filterd-Recvd-Size: 3760 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Oct 2019 17:53:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571766787; 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=2GL6Ua79+M7Cq+4ECwNjr+Wwc2OmFSxszYewlLqFHGg=; b=f/jyi7FohFW0SBWwy9jBrAcUnMTV7yrvOFPq8yFpOG/Ufwhk/lhoyk7Ig4De30KOnmYstZ 3ZjrMDtxp770hcfOAEtp9fUts9wkgND2utbtq/kIHUtTKqoh+RbsQfbXDdt4tRHhzYkB0m lyCs40DuDAAbdwvjLh7VwYBRuAukzmQ= 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-160-HacnLdbPNoCIHTPAB16LwQ-1; Tue, 22 Oct 2019 13:53:03 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 422961005509; Tue, 22 Oct 2019 17:53:02 +0000 (UTC) Received: from redhat.com (unknown [10.20.6.178]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96DD35D6A9; Tue, 22 Oct 2019 17:53:01 +0000 (UTC) Date: Tue, 22 Oct 2019 13:52:59 -0400 From: Jerome Glisse To: Jason Gunthorpe Cc: Ralph Campbell , John Hubbard , Christoph Hellwig , "linux-rdma@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH v2 2/3] mm/hmm: allow snapshot of the special zero page Message-ID: <20191022175259.GA5942@redhat.com> References: <20191015204814.30099-1-rcampbell@nvidia.com> <20191015204814.30099-3-rcampbell@nvidia.com> <20191021184927.GG3177@redhat.com> <95fa45cf-a2ce-fab8-588d-8d806124aef3@nvidia.com> <20191022024549.GA4347@redhat.com> <20191022150514.GH22766@mellanox.com> <20191022170631.GA4805@redhat.com> <20191022170916.GL22766@mellanox.com> <20191022173026.GB5169@redhat.com> <20191022174107.GM22766@mellanox.com> MIME-Version: 1.0 In-Reply-To: <20191022174107.GM22766@mellanox.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: HacnLdbPNoCIHTPAB16LwQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Oct 22, 2019 at 05:41:11PM +0000, Jason Gunthorpe wrote: > On Tue, Oct 22, 2019 at 01:30:26PM -0400, Jerome Glisse wrote: >=20 > > > Smart drivers can test somehow for pfn =3D=3D zero_page and optimize? > >=20 > > There is nothing to optimize here, i do not know any hardware that > > have a special page table entry that make all memory access return > > zero. >=20 > Presumably any GPU could globally dedicate one page of internal memory > as a zero page and remap CPU zero page to that internal memory page? > This is basically how the CPU zero page works. Yes that would work too but i do not know of any upstream driver that does that. > I suspect mlx5 could do the same with its internal memory, but the > internal memory is too limited to make this worth while. >=20 > mlx5 also has a specially 'zero MR' that always reads as zero (and > discards writes), but it doesn't quite fit well into the ODP flow. Well you can always ask for new stuff to your beloved hardware engineers, they never say no right ? :) Cheers, J=E9r=F4me