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=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 4387CC433F5 for ; Mon, 20 Sep 2021 11:15:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1C5860F6F for ; Mon, 20 Sep 2021 11:15:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F1C5860F6F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+Tg34esXHdENyhBhaK6qnhPSYnI/CxBaWSwsudDH39g=; b=CyrWPcesikwE0Gt32u/TGIZjWF SYiQhk1jYBGLHjAovC6Umxx4c7jovzDHztZ0LVqMsTwaWM8R1hWsdJEC9f5/eodyHIqq2aKuSo1+f zLX3SRpaaFKqZ9xv/VqgM1HejrYdgONKawx8OYt2zoYyRuo5Qe92WtVkU1o9z+MVcTQPJLzDo6FCX ap5SV7v55dmFIMDt0k012GCpoWMb3/mo/XZ69Ui/TX5ziR88ZkGez1+HQ6nm3oFHZOV6aKsDKpiFd Z5e9jcj79pihk6Nr+IaOT6CBbJpxiAtySylZqbMcvXuy1aJD70n5U29BvF3pY1saxABIn4tPMjWpr MoY9EmWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSHF4-001Nf9-Ie; Mon, 20 Sep 2021 11:13:46 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSHF0-001Ne4-84 for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 11:13:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632136419; 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=IZ8YEasz0PdN4ukrSk2HlDUkS7Znu8KVlo9VMULnn3Y=; b=FZj9TLgkZG2e6QmLYSpMKBWVHtZXfZlKF/VHd1Ng+buQlLmAtxYqFpl5baSCKmg9ic3jXI DnbPu+KMCK5w19Lq4hSY8o1TW26K7L12M5X44rRYTJa8B7unQWW+3nPUTTEfiHMn2c1Mcs lXzYqoSNGB3puqLCCfJmvfBn/K1LWD4= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-cyQ1U9-nOLK55PMZYp-fLQ-1; Mon, 20 Sep 2021 07:13:35 -0400 X-MC-Unique: cyQ1U9-nOLK55PMZYp-fLQ-1 Received: by mail-wr1-f72.google.com with SMTP id f7-20020a5d50c7000000b0015e288741a4so5778047wrt.9 for ; Mon, 20 Sep 2021 04:13:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=IZ8YEasz0PdN4ukrSk2HlDUkS7Znu8KVlo9VMULnn3Y=; b=1gZOfDDcwUtUywJh24XQbrqwP282JfdcsdxcHqdUaWVjKsIA0A6THWeLmsylXsp8vE +Ctfd4HMiJ/QW2/mvU6wBZAaKr/tru0Zohm0S+h+mNu7K8zQVbyHIfHb18J0SvdBumex jrEofl7BmWnyOamPXQ8om2sw9RXACMsYNprVxyJkm+GiIRHlBzA2rRjnpy41iCmPuA0t VCray6KOWZdpMmy4KnN2xppbxPhg73Y9zw931Iqpd+xD7IIcfLxuyNCOVC3hJILtQAJY tcSbUr/3sAlnQ3dkBLec8P8oGglIcgOkM6h4sFFfZMFLZzsVmuYz1eg3mAi8TlwG+Bnv epYg== X-Gm-Message-State: AOAM533VQDZQzaqzcyiuPiKM4EaY5Zum0ep77SrWG+5WtjbzldvmSy+x ZJTUyqXRn9lFFuSfff58nR4fdSdH9KpeTLy1CgL6/Rz4Bw41Fth0TFuqQB3rSnL2gTQ477X5/Jm wIl2fNmRIK7KUGV/kw7wsgspWoOfo5DVUU1pWeRUQ9tNJlmu3E5kDWxceW9WjGituYjejIKnyb2 JOw0xPp1g= X-Received: by 2002:a5d:4e90:: with SMTP id e16mr27545313wru.243.1632136414711; Mon, 20 Sep 2021 04:13:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVVC3QWCiYBVueV5VyBnjktyocWHYCd61aZMvqJvpVU+4t4lDWOAg5sex5oshyENhYJauZeQ== X-Received: by 2002:a5d:4e90:: with SMTP id e16mr27545282wru.243.1632136414457; Mon, 20 Sep 2021 04:13:34 -0700 (PDT) Received: from [192.168.3.132] (p4ff23e48.dip0.t-ipconnect.de. [79.242.62.72]) by smtp.gmail.com with ESMTPSA id n68sm19504842wmn.13.2021.09.20.04.13.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Sep 2021 04:13:33 -0700 (PDT) Subject: Re: [BUG 5.14] arm64/mm: dma memory mapping fails (in some cases) To: Christoph Hellwig , Mike Rapoport Cc: Catalin Marinas , Robin Murphy , Alex Bee , Will Deacon , Andrew Morton , Anshuman Khandual , Linux Kernel Mailing List , linux-mm@kvack.org, Linux ARM References: <20210824173741.GC623@arm.com> <0908ce39-7e30-91fa-68ef-11620f9596ae@arm.com> <60a11eba-2910-3b5f-ef96-97d4556c1596@redhat.com> <20210825102044.GA3420@arm.com> <20210918051843.GA16104@lst.de> From: David Hildenbrand Organization: Red Hat Message-ID: <71b7d1b5-4a5f-9053-b22b-4d946cbf6d6e@redhat.com> Date: Mon, 20 Sep 2021 13:13:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210918051843.GA16104@lst.de> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_041342_391587_F670EE15 X-CRM114-Status: GOOD ( 17.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 18.09.21 07:18, Christoph Hellwig wrote: > On Sat, Sep 18, 2021 at 12:22:47AM +0300, Mike Rapoport wrote: >> I did some digging and it seems that the most "generic" way to check if a >> page is in RAM is page_is_ram(). It's not 100% bullet proof as it'll give >> false negatives for architectures that do not register "System RAM", but >> those are not using dma_map_resource() anyway and, apparently, never would. > > The downside of page_is_ram is that it looks really expensiv for > something done at dma mapping time. > There would be ways to speed it up, similar to https://lkml.kernel.org/r/20210902160919.25683-2-david@redhat.com but the end result is still walking a list. Question would be, how much that overhead matters in practice. -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel