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 B2960C54798 for ; Thu, 7 Mar 2024 20:43:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1DB656B02AC; Thu, 7 Mar 2024 15:43:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 18BA06B02AE; Thu, 7 Mar 2024 15:43:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 053AB6B02AF; Thu, 7 Mar 2024 15:43:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id E9F3A6B02AC for ; Thu, 7 Mar 2024 15:42:59 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BEAA8A077B for ; Thu, 7 Mar 2024 20:42:59 +0000 (UTC) X-FDA: 81871417278.13.68BDD65 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id BCA1F180017 for ; Thu, 7 Mar 2024 20:42:56 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="uW/YAn+0"; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709844178; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gHWKCalNOCUp/sGYzRQfEmSVLkVHgYaMg5p01hgA67Q=; b=JfMNL2RatRaCmSDYz11G/7cCtAd++mQ0L2qqaRTM8J7uRRpeZ3doK8mxHGop+PQhbfiQD/ sHNExg5rIKI3pXkqj2iU97ztZejjWCD3+l0WOrjkotcEhqLM6FKd1BCdYJxFGKtgf4RyOc R19C9l141I01AC+r37egZcaZP408ITI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709844178; a=rsa-sha256; cv=none; b=L335U7EMul4bmlYerRNKqmAfO7UqTG08yJcaUfFTxpBN9wTk4jRKOaw5OhtvjW+oHb1gmn 1k8kbkT5rt9vt0c7CvjZgu4FfZqQsRDMDFKrwah8a93/gXzmDa8W8ieJtMxCWLIo8iJbxe 8cWwWhXJeNTK3vrV4NovQ6hxpJyC29U= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="uW/YAn+0"; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=gHWKCalNOCUp/sGYzRQfEmSVLkVHgYaMg5p01hgA67Q=; b=uW/YAn+0rkzQbYaubSvUK2DoUa 2hIW3xFSFwYX3GSeDVU1cYyZjuWEfHRUP1jeukYaYo3ILHKjfWMDDa95wyeTKAIuhX4Hoey7R6/CT xlRw7yXGPGyBVd2ohB+ElEeidbU/BX71oD6ZSDGEZ64gA9FZY16w3H+AOQe8heNyocOxV0YMvYcgg QD2GYnHm7X0gGtz4g6V1kaUVpbWOQIH6aJvKmfSB883F2UfeD9mV3A1hC8eS3NLT0hOVatX35I/QY cxIyVLySYl42EEzXZim2fersfrqlwnhidiiH4rI8akmceNR3BYZXJDdaUZftH2vTs5CmoXsFvBdwb ZnHiHZ3Q==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1riKZp-00000009vjc-0dhD; Thu, 07 Mar 2024 20:42:53 +0000 Date: Thu, 7 Mar 2024 20:42:53 +0000 From: Matthew Wilcox To: Ryan Roberts Cc: Zi Yan , Andrew Morton , linux-mm@kvack.org, Yang Shi , Huang Ying Subject: Re: [PATCH v3 10/18] mm: Allow non-hugetlb large folios to be batch processed Message-ID: References: <367a14f7-340e-4b29-90ae-bc3fcefdd5f4@arm.com> <85cc26ed-6386-4d6b-b680-1e5fba07843f@arm.com> <36bdda72-2731-440e-ad15-39b845401f50@arm.com> <03CE3A00-917C-48CC-8E1C-6A98713C817C@nvidia.com> <57257477-8314-4898-aac6-82585dcb3508@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57257477-8314-4898-aac6-82585dcb3508@arm.com> X-Rspamd-Queue-Id: BCA1F180017 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 5w6mkqjmkuxuqf7b95c5m19uo9y8ryob X-HE-Tag: 1709844176-428331 X-HE-Meta: U2FsdGVkX1/iaLbwUBkgwl5ReXp2lp5V9npF8zvJWtE95Bi85wsKc11FkilW7fqGWEo1EhS5WoFtIJq+yAOB0WK+boSrllQnQejCr/rj3X85DwdCarzUn4yVqVrDg5fDz60C7s4YeeggsckpYuYFzbz8aJ3tV9/ACquw9Os5MIHrLtKG30Bvb0L1f181Hx4Oy351qqxAAxRYVCpRnQY7Y1hnEIPB34QtIaWcIRpaQVOiieNjtp5lTC4pXL/wgBn4kI9LF7W0mc/BoDNvqA5GTL/qaZryQPH0+FVkRq6V6e5X+H9jW1RYbvQyFqWsrDDdNRbVLo5Vc6OUNsxXHnSFSiW7CgXHyqUUZ618GDjwGwxDu+Q8v/ZchWWJJv7maJI/mFZlgLInwHPMVBHdZS8RSp+f6NV2I9f0TQ5f9Tf8PI6LNpSN1KavIAUFsUVFDoNeRM1goeKS5oZ8Sd+YX7TEpC5sgvZT+JIiVHrmQKD7Ephkn1QzgMkaM3aGZUIP+ERSzTSpAr8y42OrrGs89+fPsJcnV3m92CBF2t+CTaitVrrDLhS1IgVkJWyMoD4yJBHHgpLxOUw/Uso9MJJ+S0QpVKqYOPJOi3obXg+UMBVQNgLGLGxMpRJJnNEn29WlirvHhObPCt6dn4DZT0v/6y+dbnn40OfQFNYZbO7CZGMl17y5GXo9eHcsXeLNJ+XsF/ViU9FrUveUkyk+Aqs+kwwDPW/rco8esR6oz/jwHIpG86PTvCc861llgTzgSaxNPVpnzN3WuyoTYST3MG43XzXcHaeo4a5F5PlTg8miWvNG+gX0nOqyhEgY/SZvgMo3yPDHg+rb0VH1tQw4JZAQAVNDZg== 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: List-Subscribe: List-Unsubscribe: On Thu, Mar 07, 2024 at 06:35:16PM +0000, Ryan Roberts wrote: > I noticed commit dfa3df509576 ("mm: fix list corruption in put_pages_list") > turned up in mm-unstable today (after I sent the above). Although I haven't done > much of the exact testing that was previously causing oopses, I also haven't > seen any since I rebased onto today's mm-unstable. Could that fix be helping us? I wish. Wrong list (lru vs deferred), and the symptom of that crash was an immediate crash, not a deferred one. Although maybe with the right/wrong debugging options ... > > The thought occurs that we don't need to take the folios off the list. > > I don't know that will fix anything, but this will fix your "running out > > of memory" problem -- I forgot to drop the reference if folio_trylock() > > failed. > > Ugh, how did I not spot that! So I guess that fits the hypothesis that the > original change is just increasing the race window and therefore we are leaking > more folios due to the failed trylock. It doesn't _confirm_ it, but it certainly fits the theory! Thanks for testing.