Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1038633ybe; Mon, 2 Sep 2019 13:17:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcG6Jp9H2kvlBNkrO6Xp+tGvGLxvoGFaDAsy/TlCgcCybard65vxj+/0KYJo3oiRmSLQkq X-Received: by 2002:a62:cb:: with SMTP id 194mr10730693pfa.130.1567455423062; Mon, 02 Sep 2019 13:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567455423; cv=none; d=google.com; s=arc-20160816; b=fIP7guRTPQX3UNdHqnCLbO6zoH9KKC79BY3KY3+uEAchleLtyVO7mq2rt5I8Ej/vEa 9sNao5CYBiq6FGsQjmhsfu4CcN1Is4ES9N6+y+dcz4CT3UGkc71uxYhsGAfxNEkeblLM OvM9APZs2yF3xfA7JNRDVYqzYrRPPgxVQch2tDUvIVi4auPESrRw3UoilAAWA5uHVdTz QRVinFHSJqXyn/qv/BYuTyXLqzlhY18VsuyN9FQf1IixHLpsAiwG0NFPioddL5m0K1I4 o/xWVRaIpQ+GxvmREWYtPU6IdGZjodHpQy8GTGs9oofYgbQpl+jh0gZwRls09bS1LsNS kAUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9N+hXoLWEe14T2S15LvjCL1Qftg7X7kuVfl5aHJqkZI=; b=qnCD/tnbrQqKlaHSznMdxvabL0urM5dW6lQ/ESAduIly9YajouC29RXWPgfEFyb/Pa NryCUE6YbbQ3pR8H6OteVtnUuSAvp1YpFVdqHTY7nEtOQSVQSGrbxwurLZ4QWhaeg7Cm Ki37EHEmW38mKXLT8+NNY0wyLK0koZ065OzOgNQqE95vJUV/ooTNmsAlRGpUdfGsqFFG XNxs2OvKYyogJrJ+gY31x4KJkf7mJvNP5rDqjXtyDbSmEFSG2b/8siSBTPD2jLmC6v00 cogy6vKP9vXC8XnJPRMqdvxRtq+lCK9n15UZqpFxz7Bz3ztUfWRiwkEtgUcv3mjVwZ1b woPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj10si12730530plb.23.2019.09.02.13.16.46; Mon, 02 Sep 2019 13:17:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbfIBUP5 (ORCPT + 99 others); Mon, 2 Sep 2019 16:15:57 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45175 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727143AbfIBUP5 (ORCPT ); Mon, 2 Sep 2019 16:15:57 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 2825B818DA; Mon, 2 Sep 2019 22:15:41 +0200 (CEST) Date: Mon, 2 Sep 2019 22:15:53 +0200 From: Pavel Machek To: James Courtier-Dutton Cc: Daniel Drake , "Artem S. Tashkinov" , LKML Mailing List , linux@endlessm.com, hadess@hadess.net, Johannes Weiner Subject: Re: Let's talk about the elephant in the room - the Linux kernel's inability to gracefully handle low memory pressure Message-ID: <20190902201553.GA6546@bug> References: <20190820064620.5119-1-drake@endlessm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > > > > And if there is a meaningful way to make the kernel behave better, that would > > obviously be of huge value too. > > > > Thanks > > Daniel > > Hi, > > Is there a way for an application to be told that there is a memory > pressure situation? > For example, say I do a "make -j32" and half way through the compile > it hits a memory pressure situation. > If make could have been told about it. It could give up on some of the > parallel compiles, and instead proceed as if the user have typed "make > -j4". It could then re-try the failed compile parts, that failed due > to memory pressure. > I know all applications won't be this clever, but providing a kernel > API so that an application could do something about it, if the > programmer of that application has thought about it. Support is not really needed in many applications. It would be nice to have for make and web browsers... And I suspect it is easy to do interface becomes available. Best regards, Pavel