From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758193AbcLAShN (ORCPT ); Thu, 1 Dec 2016 13:37:13 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:34593 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757869AbcLAShL (ORCPT ); Thu, 1 Dec 2016 13:37:11 -0500 MIME-Version: 1.0 In-Reply-To: References: <20161128072315.GC14788@dhcp22.suse.cz> <20161129155537.f6qgnfmnoljwnx6j@merlins.org> <20161129160751.GC9796@dhcp22.suse.cz> <20161129163406.treuewaqgt4fy4kh@merlins.org> <20161129174019.fywddwo5h4pyix7r@merlins.org> <20161130174713.lhvqgophhiupzwrm@merlins.org> <20161130203011.GB15989@htj.duckdns.org> <20161201135014.jrr65ptxczplmdkn@kmo-pixel> From: Linus Torvalds Date: Thu, 1 Dec 2016 10:37:09 -0800 X-Google-Sender-Auth: 0zzH3KpCFpd2CHJzVCeUv8zH-sQ Message-ID: Subject: Re: 4.8.8 kernel trigger OOM killer repeatedly when I have lots of RAM that should be free To: Jens Axboe Cc: Kent Overstreet , Tejun Heo , Marc MERLIN , Michal Hocko , Vlastimil Babka , linux-mm , LKML , Joonsoo Kim , Greg Kroah-Hartman Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 1, 2016 at 10:30 AM, Jens Axboe wrote: > > It's two different kinds of throttling. The vm absolutely should > throttle at dirty time, to avoid having insane amounts of memory dirty. > On the block layer side, throttling is about avoid the device queues > being too long. It's very similar to the buffer bloating on the > networking side. The block layer throttling is not a fix for the vm > allowing too much memory to be dirty and causing issues, it's about > keeping the device response latencies in check. Sure. But if we really do just end up blocking in the block layer (in situations where we didn't used to), that may be a bad thing. It might be better to feed that information back to the VM instead, particularly for writes, where the VM layer already tries to ratelimit the writes. And frankly, it's almost purely writes that matter. There just aren't a lot of ways to get that many parallel reads in real life. I haven't looked at your patches, so maybe you already do this. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f197.google.com (mail-io0-f197.google.com [209.85.223.197]) by kanga.kvack.org (Postfix) with ESMTP id 26BCA6B0261 for ; Thu, 1 Dec 2016 13:37:11 -0500 (EST) Received: by mail-io0-f197.google.com with SMTP id g8so27090764ioi.0 for ; Thu, 01 Dec 2016 10:37:11 -0800 (PST) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com. [2607:f8b0:4001:c06::241]) by mx.google.com with ESMTPS id 35si1193402iol.81.2016.12.01.10.37.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 10:37:10 -0800 (PST) Received: by mail-io0-x241.google.com with SMTP id j92so2682281ioi.0 for ; Thu, 01 Dec 2016 10:37:10 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20161128072315.GC14788@dhcp22.suse.cz> <20161129155537.f6qgnfmnoljwnx6j@merlins.org> <20161129160751.GC9796@dhcp22.suse.cz> <20161129163406.treuewaqgt4fy4kh@merlins.org> <20161129174019.fywddwo5h4pyix7r@merlins.org> <20161130174713.lhvqgophhiupzwrm@merlins.org> <20161130203011.GB15989@htj.duckdns.org> <20161201135014.jrr65ptxczplmdkn@kmo-pixel> From: Linus Torvalds Date: Thu, 1 Dec 2016 10:37:09 -0800 Message-ID: Subject: Re: 4.8.8 kernel trigger OOM killer repeatedly when I have lots of RAM that should be free Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Jens Axboe Cc: Kent Overstreet , Tejun Heo , Marc MERLIN , Michal Hocko , Vlastimil Babka , linux-mm , LKML , Joonsoo Kim , Greg Kroah-Hartman On Thu, Dec 1, 2016 at 10:30 AM, Jens Axboe wrote: > > It's two different kinds of throttling. The vm absolutely should > throttle at dirty time, to avoid having insane amounts of memory dirty. > On the block layer side, throttling is about avoid the device queues > being too long. It's very similar to the buffer bloating on the > networking side. The block layer throttling is not a fix for the vm > allowing too much memory to be dirty and causing issues, it's about > keeping the device response latencies in check. Sure. But if we really do just end up blocking in the block layer (in situations where we didn't used to), that may be a bad thing. It might be better to feed that information back to the VM instead, particularly for writes, where the VM layer already tries to ratelimit the writes. And frankly, it's almost purely writes that matter. There just aren't a lot of ways to get that many parallel reads in real life. I haven't looked at your patches, so maybe you already do this. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org