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 832B8C05027 for ; Thu, 9 Feb 2023 22:30:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E59956B00B2; Thu, 9 Feb 2023 17:30:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DE2036B00B3; Thu, 9 Feb 2023 17:30:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C83896B00B4; Thu, 9 Feb 2023 17:30:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id B18286B00B2 for ; Thu, 9 Feb 2023 17:30:27 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 64FD412104E for ; Thu, 9 Feb 2023 22:30:27 +0000 (UTC) X-FDA: 80449198494.05.E3D91E4 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by imf18.hostedemail.com (Postfix) with ESMTP id 84A671C0019 for ; Thu, 9 Feb 2023 22:30:24 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=aMkSEq+2; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf18.hostedemail.com: domain of zokeefe@google.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=zokeefe@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675981824; 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=4RWE0TUz0ClhyYMw1rdJQckjY7Z69dbWT8ROMhj4VLk=; b=Fogdbjz3uxlqmzFBhy6Sn0uKg/6NiQFn+HyWbrnDPql7u7eKMbqIUNwBPjj/iE5otuyie5 ZaJoHZB7/9B7E9u2rl+xr5N1/HoibTVOiV3L0bi+LCex9dUXiFQq20pLkmFJbuUWaz6H0N wIyTpTxuZlRRGAhPDaXe14FmG7pSVTQ= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=aMkSEq+2; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf18.hostedemail.com: domain of zokeefe@google.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=zokeefe@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675981824; a=rsa-sha256; cv=none; b=G6JOpL74MbZhUWQMvbuoZaKOB6Kdk9zzrp/E6+D+oFXAlK2pg+LDEn3ShZgoSyr2O8V0gQ fPId7Rnj1SOP9dc5FRG2iO4mpGb5q/63QCmzkvwI5OE7Lv5wsnqJemNuVxO0lvhhiZGUTt MNRQ02gN2NstBbZFGZa0tFJ1qlp3hjw= Received: by mail-ej1-f47.google.com with SMTP id ud5so10973829ejc.4 for ; Thu, 09 Feb 2023 14:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4RWE0TUz0ClhyYMw1rdJQckjY7Z69dbWT8ROMhj4VLk=; b=aMkSEq+2HrICw6SDl0II7+fRfPlsFp9cUY36bg9k0NSWe1NTk0tN9Uy1IXTS1CDD6v AmsZlqhowcVxQkUBgnjmouG5FMm+0A3tjCop10VtDo/wbrD/3TJKoB9tMQ2Duqjdl4hZ 0JV/jZFZoqFpowdRB3And8gC1wfWcVmx+60SOwISa826lmw7DeOEusaPTJhEeresnars J0AcOR1Da9oWy7BsxxOCXbgN2g2NhMcABNERRtbnAWKXt1d+W5Mv1ISmAo+Nnd9hcDfu o/F5bvuFZRt3fk/mMBL7qY7ykVDkdlJ26lJ2aIpS4yn8nbYkmw0e9GfagPH4xGcFHw9w 71+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4RWE0TUz0ClhyYMw1rdJQckjY7Z69dbWT8ROMhj4VLk=; b=Ya2yWWBz9fyjayhOCx20sYNHXva03rbwgf0DaY/IRt8hSIiCkS1KVXGpl2EXmnZJrv Ci3vNYnuErjrS8akXVcn/VJfBGkUZOt2oOyhsQpKZIi31fT4BhqzngSsMtYDe7v4ODcQ UXeMB6eJM799I0iQk2cav2TgDr0VfGAXQ+iInAngbVJbOA98I4Wp1T022QYampLG/Hep UUqfHes3vY5Uz0/SaetBa7PD9oU3Jows5MdHBZrxcByIAN9AQgfuJxjml+5ksWzyvP8z AZ9M4y/yCE0VnEOXYGiBFwul9WrhY2uSlx2/zKIKfWztuLkuZ9Vy4tSjPH6BC6EHpzY8 LZbg== X-Gm-Message-State: AO0yUKVDEV0fAnQq4dzDAYw6O282KDODy+QfD1u3i/tsN8BNuwt1mI4u cQ3dbwZXQYgh9VcC4fH+m4colylT8XlJCkUTzw+8uw== X-Google-Smtp-Source: AK7set+Frbb3BGjz1IF2yXK4cqBXZ5sTV9QqkNab+FgdW5TiXIxTy9yO8COITT8r7LUJy9S6PbcWBxZ3k2QAEEvhB6c= X-Received: by 2002:a17:906:52c8:b0:8af:2a8d:8d15 with SMTP id w8-20020a17090652c800b008af2a8d8d15mr1125555ejn.126.1675981822789; Thu, 09 Feb 2023 14:30:22 -0800 (PST) MIME-Version: 1.0 References: <20230125015738.912924-1-zokeefe@google.com> <20230209132846.122ad88e1c2bd0603a630e5c@linux-foundation.org> <1f344fc1-834d-f1df-8a2c-79918be5b22@google.com> <20230209141221.b7881fb0783a58571f2bca53@linux-foundation.org> In-Reply-To: <20230209141221.b7881fb0783a58571f2bca53@linux-foundation.org> From: "Zach O'Keefe" Date: Thu, 9 Feb 2023 14:29:45 -0800 Message-ID: Subject: Re: [PATCH 1/2] mm/MADV_COLLAPSE: set EAGAIN on unexpected page refcount To: Andrew Morton Cc: Hugh Dickins , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Shi Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 84A671C0019 X-Stat-Signature: ohwrrnfit8wjb69ooh65xeawny3a4p84 X-HE-Tag: 1675981824-4 X-HE-Meta: U2FsdGVkX19x9IO5B7LnwHZrua53JZlwRTxDBBGaa283iZUoWrBq2caukwm+r8iOfElfwZqzftHoo7ua3FZNIWHeujCjAjXtAM/NhUlOKFUhYeq3fFqzzdgGETvdvdwJ2ssX0+6wwCHF7F8VJHDvs1tXzT9Fi3cF3cz7qjUqISMURao55P7JjU6/d2XvSf2Cf3elicAP3JJWf4dvlJ5z9o7WNhBhErwhCebLMLNSGrS7m7QIysG8u882Gij0Ojkp5pEobFbTn2dW8Gkd0GX2NvJdjWpFCKT7weJCHOYTL48qdiuvepSUq1TIICBHHr2CJq2+bAS2X5xc5yx0Yj5SXoCU3XdFJ4GpYzXgWsYKHBSZJ+h4bQ0vp9RrebEK22qyB6wat1cwTDKk+xJRiQhuE1K1IGCvv6VcFqetFieemyUTo3OMTUAtbpXArAao2dPe6/4pQSQcm4PXrNwdEIIqmqFGmLtelDsA5+1meTcIt+jZfZNEfhYHx+xmkN2jRhGw6lpceRsr9IlIfMaygQ2vyFxFkt6jgeQumMudb3h+mu7zQwDGhyRBBW8Hb3kBAVzrKJnOPvlZ1wzixifqne1QXqFLWeEhdCz4/zhNDta8gu13DLYfSpdMyJH96Y+/6FZvir3V9GHFrYluxAvB4yjXEBYEqv0g8VpTqC1LC8JFNY+1oIZI+VIxsifqVu42mkRq+rwmFw9IybgS1KPcsAPmTmhXGVhAh30AGvv/2j7i7dihJz0wPLpVyXAhae5shVgfKEy7XY+LEuwtx/B6g8sByBT35U5QIrEfaZn18CzbOmDr5kObF3MMQEvD49d5S2F6L1fM2/AIPjuz0/ismG58jzqdHcnCKxiPGCIcRCRQtLiZvdEpEo6BTgYA/8JgaAY9kkcNZrpWuvJcZRkiyr2sQhv7gn1Yao1c7om1y8RJ7FvIFMkMypdR323sxAzZqdhWwe0k82HN9kfEV3Mx4AY twUPvq1e vZ4Meyf98ycmkk4T6Jwt/uSTGfVRhbTRpHubjhDXZbw5k7TTjlacalcsFaKhqlsq8MDiThwZxENK0rzWQ2g/Cta9QJncuLW5QjnP2V63q8k5JHrvqhqLGF1ZP0jkepTJoNkYEgga60WoM6txnPWhrTPrzM3/mtHg8ACtAGid1DtIs7YXP0spfnJl/e8NzJGNoqFEShmqN+Qv+F26JwPVsyZ55Mrtl3Lr97QZgsI5j3klsawStL3EXY7f+uS7ptJqaN+TNR/SrzbEevJuQJacrxTFqZXe+Pd8v/Grnyj/f0vmvxJBapFEpqc/SExIV3fD73nrqEW7/FrTmJWSOfJkJTLUPwemRUEWinorzWtGEkbTIe+bRBc17bBUf1w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 9, 2023 at 2:12 PM Andrew Morton wrote: > > On Thu, 9 Feb 2023 13:50:30 -0800 (PST) Hugh Dickins wrote: > > > > > > > > > I'm not seeing anything in the [1/2] changelog which indicates that a > > > backport is needed. IOW, > > > > Correct: it's just changing the errno for some racy cases from "you're > > wrong, don't bother me again" to "it might be worth having another go": > > not fixing an instability, as 2/2 was. > > > > > > > > # cat .signature > > > When fixing a bug, please describe the end-user visible effects of that bug. > > > > If whatever's being run by the end-user is coded to try again on -EAGAIN, > > then the end-user will less often see occasional unexplained failures. > > > > OK, thanks. I redid the changelog's final paragraph thusly: > > : In this situation, MADV_COLLAPSE returns -EINVAL when it should return > : -EAGAIN. This could cause userspace to conclude that the syscall failed, > : when it in fact could succeed by retrying. > This looks good to me. Thanks Andrew! Also thanks Hugh for being on the lookout for this patch -- I hastily read through my emails regarding which patches were merged where and had assumed this merged with 2/2. Also, apologies about the confusing v1 [1/2] and v2 [2/2] fiasco; in hindsight that probably wasn't the most decipherable thing to do :) Best, Zach