Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp81402imm; Thu, 31 May 2018 19:07:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLDcdr4FYO32Sp8sSeBetp6RSvmblEFRBkuYUFk0UIqrERofAZe3DxX0KEqW1umyCM9iHk1 X-Received: by 2002:a17:902:2c01:: with SMTP id m1-v6mr8207027plb.347.1527818825038; Thu, 31 May 2018 19:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527818825; cv=none; d=google.com; s=arc-20160816; b=t6+C4Mb8Lzn0Qr8rksxWsNLee0602qOSmoimk3Wi407ovOp1urglrbVzTMNSrRVwGk /GSo/kUQxZQFariJ81DgkqOGSE4Jq4MqNune4tPPFiD/Hf9Yb8S5QJdKJZRRGYzgmW6J JRonZhLQdn/LA+/Ilj8qEQLLeommHato2UHUA/Gq6vItwy7BmHIA1OauQRBi8kB1qWOM g8alZRE6QKiA8cILIieEz564iX9XDwi0mESNnpwVITiTpimHcWqtbl+KH30ACWCg2tYP QVkqt4wa+1aKokC2RjfIoGPajDUavJ68/dUMy8bikmacdnOYqNO2OZwVwSXLFj1heEDD 2XFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=fmXZ4qoQG16LIV+KoDaOzz40Y9wlQrYm1N4+a0HiWs8=; b=lOWaBHUBZZN95e2b6frONh1ce/10lc7ij0Gjjjcd6sFfZyEf33YNV3+e6WDFsIFFNP uKIGb4wss91ucqH8u5ERvUIP+u4EqelGyja2O9W8eGM//kGOEEqP9rVVlPfW9OYj6iDH V8pnv+MNz7syzVS1kv2vvJIReyZcPtbgkRuEteOb5HuZU1rHc/sTBeReGC18UOfBag2c fsw9ESe+rObjrr5f20Dvm/uGtZQ2q0yOWGyOK36LcRXx9vGgq3tZwilzqoTkT9JAHqvK Hk/L70+rmW7OPE/3KukBrnhPL67l4Uja9Gv0Anx6tRshTzKcQK+TC+jiPSuApL02OE5B Cncg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=CiTW8whD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si38027522plb.246.2018.05.31.19.06.50; Thu, 31 May 2018 19:07:04 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=CiTW8whD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbeFACE6 (ORCPT + 99 others); Thu, 31 May 2018 22:04:58 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:36742 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbeFACE4 (ORCPT ); Thu, 31 May 2018 22:04:56 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5120ob6132806; Fri, 1 Jun 2018 02:04:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=fmXZ4qoQG16LIV+KoDaOzz40Y9wlQrYm1N4+a0HiWs8=; b=CiTW8whDIof3Cf1vyF0/FEt64/QFCKqraWdf+a/EBc4Bjjk1iRyqNcYvEelgfE7u04S9 We/17lw/tQMDpOKTBPN5CGaPc2JiRK8mu+BshbqL909aFN9g9g8QtViLZ/Q+ASj6miEJ fxsTcoTgJaGKN5CFd57VcKdNlWCgQLmnliR8Ep5Yr5AZaJ90Jy0CfTawhS2c/QVlrl75 nGr+SAvwcpIJ/v+hWNo5hb9Ks6tVzFrVJ/7zNwWM+lYi2JpXVzkINHwnD2h3FP1LVBHI 5pNVHrioiTl5n57BjlUBG+PkbVBwGljE3GUZgVdU33yWpImMSTNxKAKyg6aPQkQ3gn04 ig== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2janje1rfc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Jun 2018 02:04:46 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5124jhn005850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 1 Jun 2018 02:04:46 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5124iMS010910; Fri, 1 Jun 2018 02:04:44 GMT Received: from [192.168.1.122] (/24.130.61.68) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 31 May 2018 19:04:44 -0700 Subject: Re: [PATCH V4] mlx4_core: allocate ICM memory in page size chunks To: Michal Hocko , Eric Dumazet Cc: David Miller , tariqt@mellanox.com, haakon.bugge@oracle.com, yanjun.zhu@oracle.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, gi-oh.kim@profitbricks.com, "santosh.shilimkar@oracle.com" References: <20180523232246.20445-1-qing.huang@oracle.com> <20180525.102321.858995452200286788.davem@davemloft.net> <7a353b65-6b7f-1aee-1c48-e83c8e02f693@gmail.com> <0e11e0fc-6ccf-aa93-9c4f-b9eae1b90643@gmail.com> <20180531065405.GH15278@dhcp22.suse.cz> <20180531085532.GK15278@dhcp22.suse.cz> <20180531091022.GL15278@dhcp22.suse.cz> From: Qing Huang Message-ID: <7d8f52e1-aa16-d20c-a9a8-35ad88c0b1ab@oracle.com> Date: Thu, 31 May 2018 19:04:46 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180531091022.GL15278@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8910 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=821 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806010019 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/2018 2:10 AM, Michal Hocko wrote: > On Thu 31-05-18 10:55:32, Michal Hocko wrote: >> On Thu 31-05-18 04:35:31, Eric Dumazet wrote: > [...] >>> I merely copied/pasted from alloc_skb_with_frags() :/ >> I will have a look at it. Thanks! > OK, so this is an example of an incremental development ;). > > __GFP_NORETRY was added by ed98df3361f0 ("net: use __GFP_NORETRY for > high order allocations") to prevent from OOM killer. Yet this was > not enough because fb05e7a89f50 ("net: don't wait for order-3 page > allocation") didn't want an excessive reclaim for non-costly orders > so it made it completely NOWAIT while it preserved __GFP_NORETRY in > place which is now redundant. Should I send a patch? > Just curious, how about GFP_ATOMIC flag? Would it work in a similar fashion? We experimented with it a bit in the past but it seemed to cause other issue in our tests. :-) By the way, we didn't encounter any OOM killer events. It seemed that the mlx4_alloc_icm() triggered slowpath. We still had about 2GB free memory while it was highly fragmented.  #0 [ffff8801f308b380] remove_migration_pte at ffffffff811f0e0b  #1 [ffff8801f308b3e0] rmap_walk_file at ffffffff811cb890  #2 [ffff8801f308b440] rmap_walk at ffffffff811cbaf2  #3 [ffff8801f308b450] remove_migration_ptes at ffffffff811f0db0  #4 [ffff8801f308b490] __unmap_and_move at ffffffff811f2ea6  #5 [ffff8801f308b4e0] unmap_and_move at ffffffff811f2fc5  #6 [ffff8801f308b540] migrate_pages at ffffffff811f3219  #7 [ffff8801f308b5c0] compact_zone at ffffffff811b707e  #8 [ffff8801f308b650] compact_zone_order at ffffffff811b735d  #9 [ffff8801f308b6e0] try_to_compact_pages at ffffffff811b7485 #10 [ffff8801f308b770] __alloc_pages_direct_compact at ffffffff81195f96 #11 [ffff8801f308b7b0] __alloc_pages_slowpath at ffffffff811978a1 #12 [ffff8801f308b890] __alloc_pages_nodemask at ffffffff81197ec1 #13 [ffff8801f308b970] alloc_pages_current at ffffffff811e261f #14 [ffff8801f308b9e0] mlx4_alloc_icm at ffffffffa01f39b2 [mlx4_core] Thanks!