From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF9E0C433F5 for ; Tue, 9 Nov 2021 06:40:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 57BAB60F6E for ; Tue, 9 Nov 2021 06:40:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 57BAB60F6E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 97FEB6B00DD; Tue, 9 Nov 2021 01:40:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 92FE16B00DF; Tue, 9 Nov 2021 01:40:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CFEC6B00E0; Tue, 9 Nov 2021 01:40:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 6DCE56B00DD for ; Tue, 9 Nov 2021 01:40:28 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 29355184B1FF1 for ; Tue, 9 Nov 2021 06:40:28 +0000 (UTC) X-FDA: 78788442936.25.B9723B9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf06.hostedemail.com (Postfix) with ESMTP id AEAC5801AB20 for ; Tue, 9 Nov 2021 06:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636440027; 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=lMewzJa6v7wv4Nf0ITz1xf4YASeaxZhdGf3FfutlQg0=; b=VIjnp71Bi33LY8QGTFYPkIsDgy38DBbuMpO5aIVr/WdDo5p7zGnDbvZqmQq3+sU/080SkI tyN43WnbXbfZ7ZSKWaQpvdMHaWJE5sOciGfyPVGTxyYE5cl0HqWi0pVkt+5wm0BuYyJG1W KUfT4bHXdQc28yqcd9IG4q9KWdYPuzg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-51-f5d_UsaUNruyWknGkp0O8Q-1; Tue, 09 Nov 2021 01:40:25 -0500 X-MC-Unique: f5d_UsaUNruyWknGkp0O8Q-1 Received: by mail-wm1-f70.google.com with SMTP id b133-20020a1c808b000000b0032cdd691994so830741wmd.1 for ; Mon, 08 Nov 2021 22:40:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:organization:subject :in-reply-to:content-transfer-encoding; bh=lMewzJa6v7wv4Nf0ITz1xf4YASeaxZhdGf3FfutlQg0=; b=PkfuEq4/8rlLKO1gnKvmTsB+HYLfpJkYzb15MAAW9d13ZVt9YsB7sw+tPSRjGEGomm aglgNSTjEQZuTBKl4WZ/su9mniPxgI7VmzZvR+dM4tDq4YddraWg9S4P+kU6IwiwsrR7 unVBJjeKWybP6n7kXQY3OXJ2eBdylUTlF2aNwF7W/UYxf64kk9H9XNTiWr/1cvR0ZstW gAFb213Put1NQpLWbOvzmYWySax1/nAkiIZp/0eLSytb4D8IAqfGCikD2GSKTJCiky2D B4VdrF3jqiTRhvKPdaok7CR6+kfVzZNIqAuh+zxHyIs/tT3XrYsVeUM/zakdYfsEqctG RHPQ== X-Gm-Message-State: AOAM532oHs5hEr9LS1QRG6WLSdO1+hZ3S85tabY4VZTm1O7+lBtbg3Ta p3JI6E1Z07KhZh9mEW9ndxjAAb52vut9Uc+3EPc0u8Box6xBKXGtfjkCsOvuJDs8vgmjt4OvC26 OHERIeQ5T+IQ= X-Received: by 2002:a1c:9d48:: with SMTP id g69mr4818743wme.188.1636440024438; Mon, 08 Nov 2021 22:40:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsEX2/Nwtg13zHzfWa1LeKJsNsbgxl1yry1CHytm+1UPD6zmBNqiPeqK90Z0hor57hPb+n0A== X-Received: by 2002:a1c:9d48:: with SMTP id g69mr4818703wme.188.1636440024194; Mon, 08 Nov 2021 22:40:24 -0800 (PST) Received: from [192.168.3.132] (p4ff23c2b.dip0.t-ipconnect.de. [79.242.60.43]) by smtp.gmail.com with ESMTPSA id l124sm1542245wml.8.2021.11.08.22.40.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Nov 2021 22:40:23 -0800 (PST) Message-ID: <1d2642e6-8251-2b82-7afe-842d60ec099d@redhat.com> Date: Tue, 9 Nov 2021 07:40:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 To: Dave Young , Andrew Morton Cc: bhe@redhat.com, boris.ostrovsky@oracle.com, bp@alien8.de, hpa@zytor.com, jasowang@redhat.com, jgross@suse.com, linux-mm@kvack.org, mhocko@suse.com, mingo@redhat.com, mm-commits@vger.kernel.org, mst@redhat.com, osalvador@suse.de, rafael.j.wysocki@intel.com, rppt@kernel.org, sstabellini@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, vgoyal@redhat.com References: <20211108183057.809e428e841088b657a975ec@linux-foundation.org> <20211109023148.b1OlyuiXG%akpm@linux-foundation.org> From: David Hildenbrand Organization: Red Hat Subject: Re: [patch 08/87] proc/vmcore: convert oldmem_pfn_is_ram callback to more generic vmcore callbacks In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: AEAC5801AB20 X-Stat-Signature: qu37fg4pcrhf55hsdi7wk5rhnw1q8yak Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VIjnp71B; spf=none (imf06.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1636440027-957559 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 09.11.21 04:59, Dave Young wrote: > Hi Andrew, > On 11/08/21 at 06:31pm, Andrew Morton wrote: >> From: David Hildenbrand >> Subject: proc/vmcore: convert oldmem_pfn_is_ram callback to more generic vmcore callbacks >> >> Let's support multiple registered callbacks, making sure that registering >> vmcore callbacks cannot fail. Make the callback return a bool instead of >> an int, handling how to deal with errors internally. Drop unused >> HAVE_OLDMEM_PFN_IS_RAM. >> >> We soon want to make use of this infrastructure from other drivers: >> virtio-mem, registering one callback for each virtio-mem device, to >> prevent reading unplugged virtio-mem memory. >> >> Handle it via a generic vmcore_cb structure, prepared for future >> extensions: for example, once we support virtio-mem on s390x where the >> vmcore is completely constructed in the second kernel, we want to detect >> and add plugged virtio-mem memory ranges to the vmcore in order for them >> to get dumped properly. >> >> Handle corner cases that are unexpected and shouldn't happen in sane >> setups: registering a callback after the vmcore has already been opened >> (warn only) and unregistering a callback after the vmcore has already been >> opened (warn and essentially read only zeroes from that point on). > > This is a nice improvement, thanks David. But I did not get time to > review it yet. The overall idea is good, I would prefer to hold on the > patches for some time and waiting for more review. > > Sorry for jumping in late. I really want this in v5.16. Please see the comment in https://lkml.kernel.org/r/20211006122709.27885-1-david@redhat.com Can we just fix any fallout (if any) as usual after the merge window? -- Thanks, David / dhildenb