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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A2BC6FA82 for ; Mon, 26 Sep 2022 08:05:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 785906B00BE; Mon, 26 Sep 2022 04:05:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 736418E002B; Mon, 26 Sep 2022 04:05:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FD2A8E0007; Mon, 26 Sep 2022 04:05:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 52A2E6B00BE for ; Mon, 26 Sep 2022 04:05:12 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 31391A01A1 for ; Mon, 26 Sep 2022 08:05:12 +0000 (UTC) X-FDA: 79953501264.05.C8894FC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf15.hostedemail.com (Postfix) with ESMTP id DDC8CA0004 for ; Mon, 26 Sep 2022 08:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664179510; 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=HEaIpM2M16xMJopiwVq/id6X3ZOhbK3867/FHXeVBbY=; b=g8Ql32CBaEFqzxDSgFkf/ygDHegyN981+ENzyAYqLSggUTXTHQ3Sfalt7SJK6GRkOVKu19 cZ3FUzYBUNgXiRmDBR4xQXOvs6/8j0BTR8d1olbwYLU3te0assPPSTZqrjNfc+GGwTVnzO QksyOGDgbLZgwKS2rQXmqxSyhvidSl4= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-548-qqnLMfEdOqyXoN7IVDefFw-1; Mon, 26 Sep 2022 04:05:09 -0400 X-MC-Unique: qqnLMfEdOqyXoN7IVDefFw-1 Received: by mail-wm1-f69.google.com with SMTP id t14-20020a1c770e000000b003b4856a6ecaso1576171wmi.2 for ; Mon, 26 Sep 2022 01:05:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=HEaIpM2M16xMJopiwVq/id6X3ZOhbK3867/FHXeVBbY=; b=qVCZh5FCh6hgxBfAjW1Ljorg6InUymHj4A6NAVz8Xoyql9L3bpuuJbYb3ZlKMSaHgv hAcf3sIhsK69eSOr3mGrFP50Xxj0n4BYejbrF6ovyq+/4ffMRYziCS+jM9DieQ3CkAVJ BrWhoIyW2QLQk7Y3yp9ZhulRbehu0DGcfXCduR6fH01sESwFRud2StzMcPnwz0HZV691 pH27oA2Xs/muzEwoJBA82IIH7DlBK3YJKhtVltIYX6owxrEVJlCXVIPgUFsYlK5uuWxm ePjWYrOL9bfxTyjNrJwAjS1BCMfUfu4kVXa0wIhe1atfBp9nHnmHtgVxo5yKdDIKOcTM Xv+A== X-Gm-Message-State: ACrzQf1xIASM2mJYuhQW22N+zoJHTKqVVbWvZRKHu1t0QCaYePfPBG5N nEQA8rolSe+1uhbTy+vtAY5KaH2GXoQrRDUwNAqSRCOC6br7J1PRjlmShC7vPM9JIO00ySoKxQQ bfL6bnd/YqBs= X-Received: by 2002:a5d:628e:0:b0:228:6961:aa6f with SMTP id k14-20020a5d628e000000b002286961aa6fmr13182647wru.36.1664179507813; Mon, 26 Sep 2022 01:05:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4J7x73T6JSoN1RTPwEm4yUUW3MfoxwZ/vG03LyK4X5HKwl6uK5ImJt70EFv1g7qMgngcw8gg== X-Received: by 2002:a5d:628e:0:b0:228:6961:aa6f with SMTP id k14-20020a5d628e000000b002286961aa6fmr13182625wru.36.1664179507566; Mon, 26 Sep 2022 01:05:07 -0700 (PDT) Received: from ?IPV6:2003:cb:c703:4b00:e090:7fa6:b7d6:d4a7? (p200300cbc7034b00e0907fa6b7d6d4a7.dip0.t-ipconnect.de. [2003:cb:c703:4b00:e090:7fa6:b7d6:d4a7]) by smtp.gmail.com with ESMTPSA id g17-20020a5d4891000000b0022a2bacabbasm13989707wrq.31.2022.09.26.01.05.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Sep 2022 01:05:07 -0700 (PDT) Message-ID: Date: Mon, 26 Sep 2022 10:05:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v5 4/4] mm/hwpoison: introduce per-memory_block hwpoison counter counter To: Naoya Horiguchi , linux-mm@kvack.org Cc: Andrew Morton , Miaohe Lin , Mike Kravetz , Yang Shi , Oscar Salvador , Muchun Song , Jane Chu , Naoya Horiguchi , linux-kernel@vger.kernel.org References: <20220921091359.25889-1-naoya.horiguchi@linux.dev> <20220921091359.25889-5-naoya.horiguchi@linux.dev> <20220923082613.GB1357512@ik1-406-35019.vs.sakura.ne.jp> <20220923141204.GA1484969@ik1-406-35019.vs.sakura.ne.jp> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220923141204.GA1484969@ik1-406-35019.vs.sakura.ne.jp> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664179510; a=rsa-sha256; cv=none; b=5P0wGPoAAjuBCCaRiK66SmV6/inrXUaeEjRtHnfpI07wuzscQGvr2pDyGx0mrOAAu27gRy NwXQ5MQZqj1tRjvf7dTKfQ1fcFlMC00pRDbd9lcNYa/emjbhHZ/oEOlrK/Aa1jE5ds8MWx paCUiOa2LiMAgC9a2vVaTyfO1nNQml4= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=g8Ql32CB; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf15.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664179510; h=from:from:sender: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:dkim-signature; bh=HEaIpM2M16xMJopiwVq/id6X3ZOhbK3867/FHXeVBbY=; b=tdltG9wEUIKSltt0JLMVgorlXTiLmdlHV6/iUuFbM1NO8s8LoR6lkYbbtBNLdfY9paTAQP gllRpLkvk866BC0SdnGhrFZrX9rv19xOW/GENqZCs0evGE4EXP+7SIQQ+ALWvUAw3ApiPY 27bdyF/6+yxtqQ6MmW9uQQzdbiU2/n0= X-Rspamd-Server: rspam11 X-Rspam-User: X-Rspamd-Queue-Id: DDC8CA0004 Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=g8Ql32CB; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf15.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com X-Stat-Signature: kzwigx6o1hieca3st4cb7eg6smgomwqf X-HE-Tag: 1664179510-927672 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: > /* > @@ -2414,6 +2417,10 @@ int unpoison_memory(unsigned long pfn) > unlock_mutex: > mutex_unlock(&mf_mutex); > if (!ret || freeit) { > + /* > + * TODO: per-memory_block counter might break when the page > + * size to be unpoisoned is larger than a memory_block. > + */ Hmm, but that happens easily e.g., with 1 GiB hugetlb page and 128 MiB memory section/block size. What would be the right thing to do here? The TODO should rather spell that out instead of just stating the problem. -- Thanks, David / dhildenb