Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3526565rdh; Mon, 27 Nov 2023 17:13:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBt8xIM8DduuQDz1jU7OFeLhmusHCUVwAwAlLGEGMgPsyCN3WvywgkHlnGy8EBsZ7Ug0IO X-Received: by 2002:a05:6a21:33a2:b0:18b:9031:822a with SMTP id yy34-20020a056a2133a200b0018b9031822amr15757548pzb.46.1701134012080; Mon, 27 Nov 2023 17:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701134012; cv=none; d=google.com; s=arc-20160816; b=OaEMyg++/U+m8iaLKopLxjmHsFSad2Wf8i8d7he81dwXEy87r4Cxa0LmS1YoGQAcUo 6zTo1ksWHtX9t4TLzJQ26RanwJJvYzs7f3XC+h5jcfU6SF0jFQZ6oCJjTIeQEQwXpwQL 5kQQSfU6Q/hyyZ9KDhn8GOTuKomFau18bI4LqQpTgOfk4YEzNrdXwwhRYbO0f2WSamXq We0wFFa+n2wPQIgVO8m3IuNVDmHXYyZSCLXL/QwLhcFnqswGbt9Z8XDcrIku1CJJ3Rwu 1xEurKQx9kUefpKOIvCKDfZFm0GF2JhUuGqe6DKRlLdwqQctrPs5RzoBZEiEXoD3nFwz YAcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0GYsTvHILUE5bHf9jrteKEji3a+vWsZWsBd4N08Nob8=; fh=pg7W59zHYUzdK5QN+w/mDSMGBWA9dcqbJ75ofnAmbMg=; b=y6jPmepXtCVTjnehiEqBqFQAyXTJsJjI4HoeY9hEDh8BzwVOPiD/iRntDh23It5TZV Mq/p44q6tJs2wILN3jDuGs5PG6TgyO9hV4eSlBw4wnre1ng650/tX1fcYpITopvcYYYK AZQQxtxZbWUHiyOj99NEjounxGUIB8QAibRQO5akAAI+7LiGagIfc7Wb5ChOdfjM/ZV6 jrqdZVlBKc3PMVd/11tyeMljFcqkrr1R4rzfplN0GYCL9TiNUvUuAAm/oUu7sICsnkkw k1Ss7PPsf9uWe80qC+IBCVMvmSZzX2T4lYb6YaTYnjei8gWVJj6YMBU6dWL8hnvJjAAg t8Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J0gGABkI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a6-20020a63d206000000b00578fe1bdfcasi11236340pgg.860.2023.11.27.17.13.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 17:13:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J0gGABkI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id B0291809E21E; Mon, 27 Nov 2023 17:13:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231797AbjK1BND (ORCPT + 99 others); Mon, 27 Nov 2023 20:13:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjK1BNB (ORCPT ); Mon, 27 Nov 2023 20:13:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74CA6C2 for ; Mon, 27 Nov 2023 17:13:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701133987; 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=0GYsTvHILUE5bHf9jrteKEji3a+vWsZWsBd4N08Nob8=; b=J0gGABkIxY3mCO27qvq4zaw7WqJp0X9r89R/IJJzb29dBuKzzjlJEUaO3Bl0fC7rIayBxF Iw6UDFTgKkzAo29+fdvgE9Mq5EPPT5If1QVwBTfFTvFLr4Hg4MLjmtTWD4vmaqDRj6GY/S 5jZpYoNqzMe9KRk2XsBr6crs6bd5EDM= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-528-ks9P6tq8Mg6AnvtM5kdH-w-1; Mon, 27 Nov 2023 20:13:05 -0500 X-MC-Unique: ks9P6tq8Mg6AnvtM5kdH-w-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-54b7e11013bso848161a12.0 for ; Mon, 27 Nov 2023 17:13:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701133984; x=1701738784; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0GYsTvHILUE5bHf9jrteKEji3a+vWsZWsBd4N08Nob8=; b=E2SR5fui5gNJSa62xHE3Yz8BpN3HmjYBwpjK2DYAl142q8+cUCfWiq3vrZfeJ59gRf 23JnvaM/H9xgxEsw8skEO400h+1Yr+U2kN/B/2eP1LhprK35CQPWZrYWEOrPLUj2fdDY rH/6ix6Lpvf0wNSTKL22+xy7laXgClXDv1qvFQld7M2YVuEp4R6U0UMQ9+2sA5P1f2l4 /wxyNvK/TmB5w8FLzeLgTmkzRO1rfN1UDh5pb7yM+DbPSh866fD4dB1zdyJ6/90wxJbT GXbxp9MpalaW9rvHbiFNoxSX707I4mG6rmTzUuSsNU/aNkyR7lQ99Z8G+DCIEbIDJt9c Guvw== X-Gm-Message-State: AOJu0YzDx3S+Ir4UBQBUpATAhPUnsNruoWdd/zEC7EriVjhpOJCzukpQ +otePBkEWblBqBKUEtrtJdD78AMqDmPOUgmZzXq2nnLNnKaJw0HHHqpuCJ0pSGLAsDWfU2lPCza iyxYtMBfIYhP6F9GmAbdpYlDYG2ej0bBu5u4CM61z X-Received: by 2002:a05:6402:2207:b0:54b:25e8:c009 with SMTP id cq7-20020a056402220700b0054b25e8c009mr5995539edb.0.1701133984408; Mon, 27 Nov 2023 17:13:04 -0800 (PST) X-Received: by 2002:a05:6402:2207:b0:54b:25e8:c009 with SMTP id cq7-20020a056402220700b0054b25e8c009mr5995533edb.0.1701133984173; Mon, 27 Nov 2023 17:13:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Tao Liu Date: Tue, 28 Nov 2023 09:12:28 +0800 Message-ID: Subject: Re: [PATCH 0/4] kdump: crashkernel reservation from CMA To: Jiri Bohac , Pingfan Liu Cc: Baoquan He , Vivek Goyal , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, mhocko@suse.cz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 17:13:29 -0800 (PST) Hi Jiri, On Sun, Nov 26, 2023 at 5:22=E2=80=AFAM Jiri Bohac wrote: > > Hi Tao, > > On Sat, Nov 25, 2023 at 09:51:54AM +0800, Tao Liu wrote: > > Thanks for the idea of using CMA as part of memory for the 2nd kernel. > > However I have a question: > > > > What if there is on-going DMA/RDMA access on the CMA range when 1st > > kernel crash? There might be data corruption when 2nd kernel and > > DMA/RDMA write to the same place, how to address such an issue? > > The crash kernel CMA area(s) registered via > cma_declare_contiguous() are distinct from the > dma_contiguous_default_area or device-specific CMA areas that > dma_alloc_contiguous() would use to reserve memory for DMA. > > Kernel pages will not be allocated from the crash kernel CMA > area(s), because they are not GFP_MOVABLE. The CMA area will only > be used for user pages. > > User pages for RDMA, should be pinned with FOLL_LONGTERM and that > would migrate them away from the CMA area. > > But you're right that DMA to user pages pinned without > FOLL_LONGTERM would still be possible. Would this be a problem in > practice? Do you see any way around it? > Thanks for the explanation! Sorry I don't have any ideas so far... @Pingfan Liu @Baoquan He Hi, do you have any suggestions for it? Thanks, Tao Liu > Thanks, > > -- > Jiri Bohac > SUSE Labs, Prague, Czechia >