Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3322003pxf; Mon, 22 Mar 2021 03:49:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKAr+GVlM8UJ5t+CKofrUPBv+XOCgVscgJE4R+crtuJh8j2aw+wR+W/ki6rjdnN3StCcCv X-Received: by 2002:a17:906:5248:: with SMTP id y8mr18339002ejm.150.1616410190055; Mon, 22 Mar 2021 03:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616410190; cv=none; d=google.com; s=arc-20160816; b=AYbCn10FPzVxH0nUduniK+7CnVYpmitFzcRqtuj7rmU82IJ/69nWccQupvO9farWjY PQDLxcO+zVRbRn2XVxNoTHcVsL/2SpigHiWcmd0z+p6Ix1Q6XyWkiSgiPM5d74GdbP6l 3bGjDCfl7+SFHvwB6LZrXb9y9NXoPGvLwITRcwVOK9eDocx5b3Qe1ZBATRWuFah+XRn7 gDe3F35H+B4PmvDQDjWCTO+dqvDR8QfcQfIZcRgvhU7X4gEHGZY4AZVvq4F3j89TB/xF c/roTdWVcKAgt0DD9kSKJfowIfXcQI2d+F/97MPxaz4PRl5bps9WBU2Cjag20KvDCchU QzKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4JtCXG1rJOroT9L7CmBbvZhIM6yyyU87x9CpZZfzFsk=; b=VUfsF2u9gwsSj+E5TJetpJm8fsU7jyFMMk76k8advoFa6afng6Ce+v12nT9IdHQ7mT g82AWBrZIw5LvNKtI/0SHrfSUkWe5zfv9O82NWTCIQOiEFJnrII3f3P+byfjc32OAoQq 0Y64HuwhW7gZKb5C//4BiU1CpyyJ4Gk0KIp98pijqAdZa42puzyDFg5TSqxJVeOLVZUW 5eZZ4o8Y7oUNbOgx5URDKBkQmwYWg4UzpVrDFSfsM4GsPUJ22PiKrEl62dSgijMHqiZW JWbY3Hnn84tfEEpypnkSErHmKUR0hKR+bQBNJji2urIOIpWvMM5AseGQojVk7INBUxAu LsJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Ye+G6PxX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si11304198ede.206.2021.03.22.03.49.27; Mon, 22 Mar 2021 03:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Ye+G6PxX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbhCVKsY (ORCPT + 99 others); Mon, 22 Mar 2021 06:48:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:58064 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230181AbhCVKrr (ORCPT ); Mon, 22 Mar 2021 06:47:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1616410066; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4JtCXG1rJOroT9L7CmBbvZhIM6yyyU87x9CpZZfzFsk=; b=Ye+G6PxX6i61dHAO9FGjbjKpwX7959c8L5jlc92IzihDvTiRPeKyxc0slp7tdYsza5QNDU TN32DZcIQI6y0zIp0NfV1Exdm2oxWFSiH0xPgcCseP4ZnMSvBZVmsxCI2zwyjqs1++I/eH 2E7D16QuzlNUq3cxc4NYwSlFK4UDdsM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 43533AD38; Mon, 22 Mar 2021 10:47:46 +0000 (UTC) Date: Mon, 22 Mar 2021 11:47:45 +0100 From: Michal Hocko To: Aaron Tomlin Cc: linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress Message-ID: References: <20210315165837.789593-1-atomlin@redhat.com> <20210319172901.cror2u53b7caws3a@ava.usersys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319172901.cror2u53b7caws3a@ava.usersys.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 19-03-21 17:29:01, Aaron Tomlin wrote: > Hi Michal, > > On Thu 2021-03-18 17:16 +0100, Michal Hocko wrote: > > On Mon 15-03-21 16:58:37, Aaron Tomlin wrote: > > > In the situation where direct reclaim is required to make progress for > > > compaction but no_progress_loops is already over the limit of > > > MAX_RECLAIM_RETRIES consider invoking the oom killer. > > Firstly, thank you for your response. > > > What is the problem you are trying to fix? > > If I understand correctly, in the case of a "costly" order allocation > request that is permitted to repeatedly retry, it is possible to exceed the > maximum reclaim retry threshold as long as "some" progress is being made > even at the highest compaction priority. Costly orders already do have heuristics for the retry in place. Could you be more specific what kind of problem you see with those? > Furthermore, if the allocator has a fatal signal pending, this is not > considered. Fatal signals pending are usually not a strong reason to cut retries count or fail allocations. > In my opinion, it might be better to just give up straight away or try and > use the OOM killer only in the non-costly order allocation scenario to > assit reclaim. Looking at __alloc_pages_may_oom() the current logic is to > entirely skip the OOM killer for a costly order request, which makes sense. Well, opinions might differ of course. The main question is whether there are workloads which are unhappy about the existing behavior. -- Michal Hocko SUSE Labs