Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9725512rwl; Wed, 11 Jan 2023 09:09:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXvTELAorCPPqgpgpTyg9OIx0s31J21NPWLNNinpFc7nugR53OrqMBGbFWc96kL7UuMxykxY X-Received: by 2002:a17:907:8193:b0:84d:4325:7f7a with SMTP id iy19-20020a170907819300b0084d43257f7amr10300716ejc.65.1673456991008; Wed, 11 Jan 2023 09:09:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673456990; cv=none; d=google.com; s=arc-20160816; b=hEW8+YDnbuqY/o5/GbK18yr6JjKDOMqRE41pf6kBtsIhn3BkYeJXEke/bBSixVoHKh vs0uFK8iXvzmMX7pt76H2iewD7PSlRTM/W+FGb4NfPm1doEBbDAiE+lXQ670xwkgAaNk LMHiCnz7CBtnwqyYKvYpKsE8PlBqPpdCY9wqFOttX20fCJ/F9YD5MaoVlNuoaoT+a/2T 6FLRuVFyiUnAwp8OBRsLmG44LOfU8jnpuLPr408XjP+NNKsmXo1jSl0aBOP+5u8VGrG8 v2qNb45l4yoeZumYxhyYY07yDM+pErLIM7UXJgkHIiScnisDDl/5XPe3eQQpoNrARdcU lEHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9Uo1F/S6/BtgInuYAgaI0yUjIL9CeDbM27HnRNyBOC8=; b=fEo6QVMBcPZAWc2OFvtkQ3g6tUNTPBUE/DgTN8KU4ek4kOEzsIjJIiQoB+jO1YBtJy 6J/wRpQq7mwtB9RacmOYebWzpbo3fvfn0NYJ2W7wBi+cr5eCon6Ec0ubdkOSJPf1zaFe r3KvxrExp0y/37HhcrCo8PAx/X9UBB1+mGJBD2KssdQw/lCTf9Zlnr3GpuIW4bZONPew odqTtRQWk2K0h7dVxr9hllWKfWVvDlgWcD/qB75fmoqhVdNItGHD7uvCX2g7nMC4CVz4 n9u8tHvG7itpwhMEZuJphPOwQds/H06CE0xCv5rx5TgvZkvn6erIY34MHb15hUTiWOZ6 8Ebw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="oUm4vmx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o22-20020a170906975600b00780a240cfd7si5191556ejy.493.2023.01.11.09.09.38; Wed, 11 Jan 2023 09:09:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="oUm4vmx/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229476AbjAKQWO (ORCPT + 51 others); Wed, 11 Jan 2023 11:22:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235478AbjAKQVq (ORCPT ); Wed, 11 Jan 2023 11:21:46 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD343395DC; Wed, 11 Jan 2023 08:19:11 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3F6B44DEB; Wed, 11 Jan 2023 16:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1673453950; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9Uo1F/S6/BtgInuYAgaI0yUjIL9CeDbM27HnRNyBOC8=; b=oUm4vmx/tY5jshUMzmTMV4ujxm9WBPq7G63760MdNaeUeWGw61qJWUsBiU/ThcpJxf3YbT 9dnFhOb83o/uIlG01AUWYKBRHbBej41yxRsJGPGrJM6vF20xCc+ljCnJ/Ur+izcnctbDnB +W6AaANj1nk+G3E8ZdNbT5nkdMWH1UE= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1EC6B1358A; Wed, 11 Jan 2023 16:19:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aLOxBX7hvmPZTgAAMHmgww (envelope-from ); Wed, 11 Jan 2023 16:19:10 +0000 Date: Wed, 11 Jan 2023 17:19:09 +0100 From: Michal Hocko To: Mike Rapoport Cc: Jonathan Corbet , Andrew Morton , Bagas Sanjaya , David Hildenbrand , Johannes Weiner , Lorenzo Stoakes , "Matthew Wilcox (Oracle)" , Mel Gorman , Vlastimil Babka , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 2/2] docs/mm: Physical Memory: add structure, introduction and nodes description Message-ID: References: <20230110152358.2641910-1-rppt@kernel.org> <20230110152358.2641910-3-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 11-01-23 18:02:03, Mike Rapoport wrote: > On Wed, Jan 11, 2023 at 02:36:16PM +0100, Michal Hocko wrote: > > On Wed 11-01-23 14:24:43, Mike Rapoport wrote: > > > On Tue, Jan 10, 2023 at 05:54:10PM +0100, Michal Hocko wrote: > > > > On Tue 10-01-23 17:23:58, Mike Rapoport wrote: > > > > [...] > > > > > +* ``ZONE_DMA`` and ``ZONE_DMA32`` represent memory suitable for DMA by > > > > > + peripheral devices that cannot access all of the addressable memory. > > > > > > > > I think it would be better to not keep the historical DMA based menaning > > > > and teach that future developers. You can say something like > > > > > > > > ZONE_DMA and ZONE_DMA32 have historically been used for memory suitable > > > > for DMA. For many years there are better more robust interfaces to > > > > get memory with DMA specific requirements (Documentation/core-api/dma-api.rst). > > > > > > But even today ZONE_DMA(32) means that the memory is suitable for DMA. This > > > is nicely encapsulated with dma APIs and there should be no new GFP_DMA > > > users, but still memory outside ZONE_DMA is not suitable for DMA. > > > > Well, the thing is that ZONE_DMA means different thing for different > > architectures. For x86 it is effectivelly about ISA attached HW - which > > means almost nothing these days. There is plethora of other HW with > > different address range constrains for DMA transfer so binding the zone > > with DMA is more likely to cause confusion than it helps. > > Ok, how about > > * ``ZONE_DMA`` and ``ZONE_DMA32`` historically represented memory suitable for > DMA by peripheral devices that cannot access all of the addressable > memory. For many years there are better more and robust interfaces to get > memory with DMA specific requirements (:ref:`DMA API <_dma_api>`), but > ``ZONE_DMA`` and ``ZONE_DMA32`` still represent memory ranges that have > restrictions on how they can be accessed. > Depending on the architecture, either of these zone types or even they both > can be disabled at build time using ``CONFIG_ZONE_DMA`` and > ``CONFIG_ZONE_DMA32`` configuration options. Some 64-bit platforms may need > both zones as they support peripherals with different DMA addressing > limitations. Sounds better to me. Thanks! At least ZONE_DMA32 is somehow better defined as it represents 32b address range constrain. DMA can be really different on different arches. Probably good to have it here. Ideally we would have a reference how that range is established but architectures are not unified in that respect. -- Michal Hocko SUSE Labs