From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbbGOB5V (ORCPT ); Tue, 14 Jul 2015 21:57:21 -0400 Received: from mail-ie0-f178.google.com ([209.85.223.178]:33269 "EHLO mail-ie0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbbGOB5R (ORCPT ); Tue, 14 Jul 2015 21:57:17 -0400 Date: Tue, 14 Jul 2015 18:57:14 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Xuzhichuang cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "Songjiangtao (mygirlsjt)" , "Zhangwei (FF)" , Qiuxishi Subject: =?UTF-8?Q?Re=3A_=E7=AD=94=E5=A4=8D=3A_=5BBUG_REPORT=5D_OOM_Killer_is_invoked_while_the_system_still_has_much_memory?= In-Reply-To: <6D317A699782EA4DB9A0E6266C9219696CA2B45B@SZXEMA501-MBX.china.huawei.com> Message-ID: References: <6D317A699782EA4DB9A0E6266C9219696CA2B3BC@SZXEMA501-MBX.china.huawei.com> <6D317A699782EA4DB9A0E6266C9219696CA2B45B@SZXEMA501-MBX.china.huawei.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 Jul 2015, Xuzhichuang wrote: > Hi, > > Thanks for your replying. > > According to the OOM message, OOM killer is invoked by the function seq_read, I found two patches in the latest kernel which can be avoid or fixed this problem. > > https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/fs/seq_file.c?id=058504edd02667eef8fac9be27ab3ea74332e9b4 > https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/fs/seq_file.c?id=5cec38ac866bfb8775638e71a86e4d8cac30caae > > As the patches said, it changed the seq_file code fallback to vmalloc allocations if kmalloc failed, instead of OOM kill processes. > Yes, we use those two patches as well internally. You may want to give them a try if this is the only source of oom killer issues, but keep in mind that other subsystems like the tcp layer will often do high-order allocations as well. If you can free up some of that ZONE_DMA memory that is unneeded with lowmem_reserve_ratio, you might get a little more room. Good luck!