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 4CA83C433F5 for ; Tue, 16 Nov 2021 21:56:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DBB21615E2 for ; Tue, 16 Nov 2021 21:56:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DBB21615E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 7D0356B0071; Tue, 16 Nov 2021 16:56:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 75A346B0072; Tue, 16 Nov 2021 16:56:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FA676B0073; Tue, 16 Nov 2021 16:56:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0121.hostedemail.com [216.40.44.121]) by kanga.kvack.org (Postfix) with ESMTP id 4FC7A6B0071 for ; Tue, 16 Nov 2021 16:56:18 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F34FD18099AAE for ; Tue, 16 Nov 2021 21:56:07 +0000 (UTC) X-FDA: 78816152016.22.B804727 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by imf23.hostedemail.com (Postfix) with ESMTP id 84A549000381 for ; Tue, 16 Nov 2021 21:55:49 +0000 (UTC) Received: by mail-lj1-f176.google.com with SMTP id e11so1429263ljo.13 for ; Tue, 16 Nov 2021 13:56:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NGSDUZI7I1mvZPeQN3C3y+QjGBgnwjJfkAsVBmVdGZc=; b=a+XkYQtPqF5RRQI3wwC+zWQDcl6Jk2H5NnW1qWcUwoRaNbjxP1LUP2iIZVf5YnfnQ/ bO6jsTt8flc9QzckB+29nGqqrlXfBqY13UDknpfbe/IDKUcqQx9JIzrKT2iQi0xPDnWt FRusVQ3k/e5mSfUl4UizYQcDxOCK+J9bpK4US5g4MlNOJpKNoYzVr+bM1fwpJeysjg8d BSslACmc0Kl1oCzQkbxv0VUJjYZJY9O0Tbr9LHc7AtWBIumaYbWSY/BAR0tzq9C9UvfD JHJ3alQND91uA/bqoZyRsjp94rux3o8yr2umKE7ZmbY1+LbsWA7jE5k24wSGkSHI7evH zp1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NGSDUZI7I1mvZPeQN3C3y+QjGBgnwjJfkAsVBmVdGZc=; b=3q+t8yJizoGsTDd6xmJVmH4KSHJ3FSTkvJuiGs4S0SAeoTLX4BMheB7ouyx30V4rbG dhKEHi3DzktQbHD4ICGJggicoWe+MhXuUGcXrJH96NX0cMPkJwvWf8V6mrdgklo/QyP5 rwyNmzlcdEX5RG+2RGG9eOcYunyFU/EI2zZ8doyuWT/8DtFwb9hQ2JKhLbFMdzmI54FT RzQ3a2fb5cMTwMo3xVGkT0wGcdOIcfGnYGVA9paQWof0MVqbwvW/S8TqvzR1sQU4WlOy btDWXUGTTOo7zdEfrYtppGDOGsnl+PODToSxfMlWvUKIrDNG3vqD8lIaejbL5kS9t6gk zp1w== X-Gm-Message-State: AOAM5338gW+SuGSnTHDCIauarQo9ivb3Ao6lyJTABkemV+nyVygr2dzE 3p2aSkUnmr1iV2wM0vfBFlb8sPfAzgqWM41eQyperg== X-Google-Smtp-Source: ABdhPJwzHP0930XAephcBcY6fRf6ULC5mJHvkVbGVHylzeqR6CYm6Qg3QjVKhQ3+Jc052J/uw9QI1JzeKIkLSqhtA2I= X-Received: by 2002:a05:651c:1142:: with SMTP id h2mr2513145ljo.35.1637099765832; Tue, 16 Nov 2021 13:56:05 -0800 (PST) MIME-Version: 1.0 References: <20211111234203.1824138-1-almasrymina@google.com> <20211111234203.1824138-3-almasrymina@google.com> In-Reply-To: From: Shakeel Butt Date: Tue, 16 Nov 2021 13:55:54 -0800 Message-ID: Subject: Re: [PATCH v3 2/4] mm/oom: handle remote ooms To: Mina Almasry Cc: Michal Hocko , "Theodore Ts'o" , Greg Thelen , Andrew Morton , Hugh Dickins , Roman Gushchin , Johannes Weiner , Tejun Heo , Vladimir Davydov , Muchun Song , riel@surriel.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 84A549000381 X-Stat-Signature: ne4m6py77oz8b4p9couu9gcmzijgoa9a Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=a+XkYQtP; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf23.hostedemail.com: domain of shakeelb@google.com designates 209.85.208.176 as permitted sender) smtp.mailfrom=shakeelb@google.com X-HE-Tag: 1637099749-674229 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 Tue, Nov 16, 2021 at 1:27 PM Mina Almasry wrote: > > On Tue, Nov 16, 2021 at 3:29 AM Michal Hocko wrote: [...] > > Yes, exactly. I meant that all this special casing would be done at the > > shmem layer as it knows how to communicate this usecase. > > > > Awesome. The more I think of it I think the ENOSPC handling is perfect > for this use case, because it gives all users of the shared memory and > remote chargers a chance to gracefully handle the ENOSPC or the SIGBUS > when we hit the nothing to kill case. The only issue is finding a > clean implementation, and if the implementation I just proposed sounds > good to you then I see no issues and I'm happy to submit this in the > next version. Shakeel and others I would love to know what you think > either now or when I post the next version. > The direction seems reasonable to me. I would have more comments on the actual code. At the high level I would prefer not to expose these cases in the filesystem code (shmem or others) and instead be done in a new memcg interface for filesystem users.