Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3702302rdh; Tue, 28 Nov 2023 01:08:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrKnUDf3rVo+zMmxYuIzmRUfrGqrSifHD53wMLGmoEZKIdBjHdT9ZeI9d9xgugmsnaDRXh X-Received: by 2002:a05:6a00:1956:b0:6cb:a27f:5065 with SMTP id s22-20020a056a00195600b006cba27f5065mr16613589pfk.34.1701162523915; Tue, 28 Nov 2023 01:08:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701162523; cv=none; d=google.com; s=arc-20160816; b=lEKO0M2vH0o95S0ec+D1lj67A0KCBGfRdJ1xjl74vvNTZz2YclFQ7wlOOhwuOOBL0I by7q049TCq1UeGl5VTTibqYGdI38vKXql3McSfsAvcLgCSr9EAsoEEiAPGbI43Jelg1L I+1oPgrEcsW03BctKMU6k/8yYtnPm5dPVPlw/27o0+b30xbR3zuCemZP/abJGwQ2TO+s lL9lw6UUr/U52xkRiYJJhWsLT2KBlvHvnD0AV5T5cHIhhUeLUOH2aoCFBrMC/yTQwcyT ehy1MSzOtJer75vRhBdEz9xXg2wPYDaNpU+aXbK6GmloQYsGMLLKxmA+SK+XJwHzzoot uhTQ== 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; bh=YdytCUyn5cNRRJv2hEdz/XdNxU+cT/USl/FZSZ/v+/w=; fh=HEhdA+3T49LrMO1cydFaDuoH6cocKOrenv4cAkBIye8=; b=nwwoi4dPKqCz/ZktPjPVnGaOxmQ3c4cdrLsh1LXGD0OVg/BrhhIgQuO6tR7mtNnYVZ YGOQSOoT3aYYLn/Xa3tXvwJN3LdEij9O9SJrpc+CKlKsG8PX+gkbqfoQSzhaOfrJEIeI JP74ABSgpeYXs4uhh431HwncysggOTw81MUiPTAyzNuCSJSuoixro6EGr0xdG9TACZWq m59jk6TaACehru92+tJyjRaICwYGTTJPbZzKYS8jeOmduLSYYQUSuSWvKM7oWFM1D3fh +T8lwNj8lveXj1eGVB3IMWekJow1TpG1bZBNwmSE64f6Q7eE5AcoU9/dXnMFDl0gTMWL iWGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h22-20020a056a00219600b006b0cfed2c77si11763889pfi.135.2023.11.28.01.08.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 01:08:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7C87C8145558; Tue, 28 Nov 2023 01:08:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234740AbjK1JIW (ORCPT + 99 others); Tue, 28 Nov 2023 04:08:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234729AbjK1JIV (ORCPT ); Tue, 28 Nov 2023 04:08:21 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4554BAB for ; Tue, 28 Nov 2023 01:08:27 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E86591F6E6; Tue, 28 Nov 2023 09:08:25 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D011B13763; Tue, 28 Nov 2023 09:08:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id /Uq5MAmuZWXmVgAAD6G6ig (envelope-from ); Tue, 28 Nov 2023 09:08:25 +0000 Date: Tue, 28 Nov 2023 10:08:21 +0100 From: Michal Hocko To: Baoquan He 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-Spam-Level: X-Rspamd-Server: rspamd1 Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Queue-Id: E86591F6E6 X-Spam-Score: -4.00 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Status: No, score=-0.8 required=5.0 tests=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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 28 Nov 2023 01:08:40 -0800 (PST) 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. [...] > 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