Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1604276rdb; Mon, 2 Oct 2023 15:10:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvCNGhbhEz8O4rg3S5SbrwgFMpotqUqnfBPzTIlzQtDqksQHWbMMsoEosdui5VD6LMhl5M X-Received: by 2002:a05:6a00:c89:b0:68a:3b39:a486 with SMTP id a9-20020a056a000c8900b0068a3b39a486mr14486534pfv.24.1696284653654; Mon, 02 Oct 2023 15:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696284653; cv=none; d=google.com; s=arc-20160816; b=KI3CvAAannespdABPRjsUUsGsMRGwupHGEeUvp/Wxic9dSlXYOh4pa1CChpEDLgkFd +MenMvvUt0xfz1Br6nm7P0GhtvbVjVCyfMzOJogw2K5NC4ZkHjXfmGEC+dpbmwHyN7lp qB9ZYHgUh9HJqLX+YdtEKbXhIANCAq8JV5r9xu6J7gVTB7dJ+xEv91lFsmmtXFfc13Ey H0a13JdUGCkh7WLC5svdU9mS19iEIA5Uf4PLqyUjyJ5PDXfLKswjKGFxB0F/nagFL/0w 2IZXnYz7vD+qy8fKC8W8PA0Y+mPUMDkLyMd1biOA5Zn9YtCgRxn7ypNq30uImG6P5+Pj F2NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=9SMs8mHNoKs8/KwUwp2IfY8WHFPaduo12w1Xi37QfxA=; fh=1y1w3Z2I2TvbAb3XHQdUPt2+yXy/gePQGCzeWbR7iKg=; b=ZDgv2swhHy1frhphARCeyuzXiRU8i2Ij9bot4PJH18DNs5yCpHDC2xYkz+gWC4CFGj R1T97bs2jiLEAygTB6imlwdbytZO6IyhlM6S4mkIUXuUQ8Q90irSjEccLhBINVJlKI4/ nAilHT8sONPy7C2mqdmUxTS2+rAD9rOauNqd+h5zFsUwtyXxFpz4oU6KDv9vpO6qSg5t iwUDULHUv7OjnFF8umnOqHHyXFZg8n6OQ7PgKKq1pDpxEUIAFfCKSpglbwuOER0Wh5KV LmxY3yNBJrmQK9UZTxRyteJh4HLe1FNl65jowggodfzfRWFt6dCoSKzi5kVqD3czXLob 4dig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HGiS6E5i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f8-20020a056a001ac800b0068fb5ca50cdsi29228879pfv.126.2023.10.02.15.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HGiS6E5i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 921D780259D5; Mon, 2 Oct 2023 02:23:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236033AbjJBJW6 (ORCPT + 99 others); Mon, 2 Oct 2023 05:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235849AbjJBJW5 (ORCPT ); Mon, 2 Oct 2023 05:22:57 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5781491 for ; Mon, 2 Oct 2023 02:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696238525; 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=9SMs8mHNoKs8/KwUwp2IfY8WHFPaduo12w1Xi37QfxA=; b=HGiS6E5iuLPB1GKS4EDvchfgAyZGW0afQn6Rb7eemz/dMs8tZkSMbolrpNltoMLwvY95re CeAFQYzHnS6yl/Jubocc9Ox7AJLTXOYxMSr9Cp9SHIAE/MsuCYqQ0OQMbwj64d/y+Fuzcw 29Gerlu7NdFBjgOFTiUJHIOtitTM4vg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-441-Hpeebgn1NFaNn4EkxUy9jQ-1; Mon, 02 Oct 2023 05:21:49 -0400 X-MC-Unique: Hpeebgn1NFaNn4EkxUy9jQ-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fef3606d8cso150975515e9.1 for ; Mon, 02 Oct 2023 02:21:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696238508; x=1696843308; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9SMs8mHNoKs8/KwUwp2IfY8WHFPaduo12w1Xi37QfxA=; b=OigkHe45sIGj2KlugLAg8yDYHlKnJCeD9S2NOVxkjdYxai47ffPWO5maryKTGUOnH6 of5tjkwhDB/CVaANp6Qpkr3JT0zgSuZEgosODJkehWLAgNjbnH1nP4CILYvcTTf0uMTK YihTDzczZRxKwAZwqQ0R0C4qEaBIc4qwmpK42S1z/kA0h6BDWLdMxGijh+3fnQ9RWEFh 0dcuheDfDeMryd9fP26e5Htay0ffywr37unJBpscJswnuhkSZWKihChf4BwLn9H3Dcz8 KBueRkOA4Xm+nNC94fbtGeD5QA3RXNFttIn3Pve7sv1b+se0/bjUrK6xfCECrNSCiVME VKAw== X-Gm-Message-State: AOJu0YzuMXWs9s1M8VStWzhl2yeoJ+P8eKBXpsSdinXCfjLcmaMwNbiF KuTbpacbW6M9XX72zEV484uhbEGBzxnevfI1faPfIEYV2N3PHK98Sl9EXBbJ8cxBV8gPvvOCHy0 SFpK8rqOuhJ5Q/AAIrP7UlF/x X-Received: by 2002:a1c:f215:0:b0:401:8225:14ee with SMTP id s21-20020a1cf215000000b00401822514eemr9384947wmc.41.1696238508091; Mon, 02 Oct 2023 02:21:48 -0700 (PDT) X-Received: by 2002:a1c:f215:0:b0:401:8225:14ee with SMTP id s21-20020a1cf215000000b00401822514eemr9384934wmc.41.1696238507655; Mon, 02 Oct 2023 02:21:47 -0700 (PDT) Received: from ?IPV6:2003:cb:c735:f200:cb49:cb8f:88fc:9446? (p200300cbc735f200cb49cb8f88fc9446.dip0.t-ipconnect.de. [2003:cb:c735:f200:cb49:cb8f:88fc:9446]) by smtp.gmail.com with ESMTPSA id p8-20020a7bcc88000000b003fbe4cecc3bsm6791845wma.16.2023.10.02.02.21.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Oct 2023 02:21:47 -0700 (PDT) Message-ID: <0b6f739b-723a-bc53-03a3-f4a793f339b4@redhat.com> Date: Mon, 2 Oct 2023 11:21:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v4 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory Content-Language: en-US To: Vishal Verma , Andrew Morton , Oscar Salvador , Dan Williams , Dave Jiang Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, Huang Ying , Dave Hansen , "Aneesh Kumar K.V" , Michal Hocko , Jonathan Cameron , Jeff Moyer References: <20230928-vv-kmem_memmap-v4-0-6ff73fec519a@intel.com> <20230928-vv-kmem_memmap-v4-2-6ff73fec519a@intel.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230928-vv-kmem_memmap-v4-2-6ff73fec519a@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 02:23:05 -0700 (PDT) On 28.09.23 22:30, Vishal Verma wrote: > Large amounts of memory managed by the kmem driver may come in via CXL, > and it is often desirable to have the memmap for this memory on the new > memory itself. > > Enroll kmem-managed memory for memmap_on_memory semantics if the dax > region originates via CXL. For non-CXL dax regions, retain the existing > default behavior of hot adding without memmap_on_memory semantics. > > Add a sysfs override under the dax device to control this behavior and > override either default. > > Cc: Andrew Morton > Cc: David Hildenbrand > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Dan Williams > Cc: Dave Jiang > Cc: Dave Hansen > Cc: Huang Ying > Reviewed-by: Jonathan Cameron > Signed-off-by: Vishal Verma > --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb