Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4423690rdh; Wed, 29 Nov 2023 00:39:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IF03MVoSkFd6v/Zy19FFHAAonSkAVg16g+UAiwBpQv+2Iqd4tRJQ6V6cPPFKErNr5wXDSKo X-Received: by 2002:a05:6358:9dac:b0:16d:bd11:4fa with SMTP id d44-20020a0563589dac00b0016dbd1104famr15219250rwo.15.1701247143203; Wed, 29 Nov 2023 00:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701247143; cv=none; d=google.com; s=arc-20160816; b=r/rh9s6rigJ8mUjtp8RMztLA0tU7fCqU0MuHPFqUCyEHXbLTrWo9MaPfINk9RCNhXx OzwwG1BAO6EmF8f8h5UkEuoxV+x8HfYi+AoTvj4llHcqLq4B5Y4+661Y5pjWL4srcGOR /JrR2sPkQCboXuD0KraGcEPYZ1rFQA7RO3fTf2GRAwfj0g9OaVbqFdQm6NK/oRur/Es2 amli/6va56OzWELz0+s0alUPl5QtI+cH/T/10Td7nJFCKToVW0pFb98WssvrSHBtG48t pfXHff98ETb0DA0vqg35YhwYxjPrfstzPcIMJ0yDx1+GluPuiInvjJlJ8TQBZbdHoSpy piEA== 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=BC4uggJfBcsQ9J288hcUReQwagRBB7yxUyX9PfI8YC4=; fh=6qNmW8Z3dBU8BUYk2Kkr3dbuuGxNun+AoOVfMHaGnpc=; b=yWaY5jGYA1c2pfdbj8dqYctNsoej5ikHTXkdFFw9mfq4UFgOqRhWSgl7Bc5FM3lYDM d7IxJl/i4JKTtQuMa6uKMmvPPttqj2AwnRBOT4OC19sOPQ26tNkWMjTZumWfp5qflvpY G6mQROCfqD4Hc3uNa8ntfHxKKSbHADN44w2WiX1uNUMu+bBtgrt8++AxprCa/rByJUbo j4cl70xv0uSzj+KDF3fgxVaD+BJUMHxqt+K1pA6BhRIlS4iIexcXVjqOfRKxjLluPYIO PwiEuda+gxdZUhICjWDsIIajqE8e4VMCcZEZT/ul13qPTlE0kiEQv5BGDV+gUYsjQ/z+ 5YlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q6OhDV4J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z2-20020a63c042000000b005c200f02d9asi14120626pgi.621.2023.11.29.00.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:39:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q6OhDV4J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id B0FF080C5FB4; Wed, 29 Nov 2023 00:39:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjK2Iis (ORCPT + 99 others); Wed, 29 Nov 2023 03:38:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232038AbjK2ILA (ORCPT ); Wed, 29 Nov 2023 03:11:00 -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 94C071735 for ; Wed, 29 Nov 2023 00:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701245464; 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: in-reply-to:in-reply-to:references:references; bh=BC4uggJfBcsQ9J288hcUReQwagRBB7yxUyX9PfI8YC4=; b=Q6OhDV4JCMvODO9U6UeYpY7t+ReGX6ehjLtordP9WvO8bWIm292x2PFH91NlfPLUap7Xy/ SYYDi8Qsra8XKHYUbH2akm631jI47rV9L7QqrCXgXd4eP8Sf2oKtKbnkxPa+omYFtaLVHJ POINE4e5+bpXsksexe7T62bACZMIfMg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-350-Di-Svtm0OSiYAyIeYfDUdQ-1; Wed, 29 Nov 2023 03:11:00 -0500 X-MC-Unique: Di-Svtm0OSiYAyIeYfDUdQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 103B18058EE; Wed, 29 Nov 2023 08:11:00 +0000 (UTC) Received: from localhost (unknown [10.72.112.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5857D1C060AE; Wed, 29 Nov 2023 08:10:59 +0000 (UTC) Date: Wed, 29 Nov 2023 16:10:55 +0800 From: Baoquan He To: Michal Hocko , ddutile@redhat.com Cc: Jiri Bohac , Pingfan Liu , Tao Liu , Vivek Goyal , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] kdump: crashkernel reservation from CMA Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 00:39:01 -0800 (PST) On 11/28/23 at 10:08am, Michal Hocko wrote: > On Tue 28-11-23 10:11:31, Baoquan He wrote: > > On 11/28/23 at 09:12am, Tao Liu wrote: > [...] > > Thanks for the effort to bring this up, Jiri. > > > > I am wondering how you will use this crashkernel=,cma parameter. I mean > > the scenario of crashkernel=,cma. Asking this because I don't know how > > SUSE deploy kdump in SUSE distros. In SUSE distros, kdump kernel's > > driver will be filter out? If latter case, It's possibly having the > > on-flight DMA issue, e.g NIC has DMA buffer in the CMA area, but not > > reset during kdump bootup because the NIC driver is not loaded in to > > initialize. Not sure if this is 100%, possible in theory? > > NIC drivers do not allocation from movable zones (that includes CMA > zone). In fact kernel doesn't use GFP_MOVABLE for non-user requests. > RDMA drivers might and do transfer from user backed memory but for that > purpose they should be pinning memory (have a look at > __gup_longterm_locked and its callers) and that will migrate away from > the any zone. Add Don in this thread. I am not familiar with RDMA. If we reserve a range of 1G meory as cma in 1st kernel, and RDMA or any other user space tools could use it. When corruption happened with any cause, that 1G cma memory will be reused as available MOVABLE memory of kdump kernel. If no risk at all, I mean 100% safe from RDMA, that would be great. > > [...] > > The crashkernel=,cma requires no userspace data dumping, from our > > support engineers' feedback, customer never express they don't need to > > dump user space data. Assume a server with huge databse deployed, and > > the database often collapsed recently and database provider claimed that > > it's not database's fault, OS need prove their innocence. What will you > > do? > > Don't use CMA backed crash memory then? This is an optional feature. > > > So this looks like a nice to have to me. At least in fedora/rhel's > > usage, we may only back port this patch, and add one sentence in our > > user guide saying "there's a crashkernel=,cma added, can be used with > > crashkernel= to save memory. Please feel free to try if you like". > > Unless SUSE or other distros decides to use it as default config or > > something like that. Please correct me if I missed anything or took > > anything wrong. > > Jiri will know better than me but for us a proper crash memory > configuration has become a real nut. You do not want to reserve too much > because it is effectively cutting of the usable memory and we regularly > hit into "not enough memory" if we tried to be savvy. The more tight you > try to configure the easier to fail that is. Even worse any in kernel > memory consumer can increase its memory demand and get the overall > consumption off the cliff. So this is not an easy to maintain solution. > CMA backed crash memory can be much more generous while still usable. > -- > Michal Hocko > SUSE Labs >