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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13DC8C61DA4 for ; Thu, 9 Feb 2023 22:30:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230300AbjBIWa2 (ORCPT ); Thu, 9 Feb 2023 17:30:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbjBIWaZ (ORCPT ); Thu, 9 Feb 2023 17:30:25 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706725A91D for ; Thu, 9 Feb 2023 14:30:24 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id qb15so8883410ejc.1 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=fQajKYuW7eipO9+AASREiHcpMAXbKAcO7Z4GnS8gtDGnOJ1SditP8rliiYdl76PbXs c5uhohOT5ahxaT2bgPky71uqqOq3haHpdzYxIaI1m3fcCvGB3R4EK3TXUA0gH0quQnRy 6Oi2hvwR2s1OyiL652gkjPK1PsPZZAaxMCE3kZui8Ewlc8ucAZcLTnSHatdc4hJIyYMm j/3TK0Cy8ewKcldvw0m+E1eDES+0Zf6otIlR21UXS/LxqXBWW8enWpEQSlhyciJQ8+qe el/jY0fNi5BD3eUSyLkvv6VUHFZQywIJOyHw17cxezh9lqqtKCAyFH/s0MJv32pfGi6r iSCw== X-Gm-Message-State: AO0yUKWYIeHDmG4BMZpw+FyzZkOYCOxa+s35uI7uH4V0LloqulUPbs0u cZeYtR2NGqMcxfxVr3NUm+CFvjeUijMwIMRdNqSK7Q== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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