Received: by 10.213.65.68 with SMTP id h4csp1145995imn; Sat, 7 Apr 2018 19:19:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+M7H/xlIRfHLKWoz6Zsu5+rzJzBO7iTDPH7gOzRb+dA3jxVH4wYElVpfyBTcxqWBzbSHv7 X-Received: by 10.98.14.215 with SMTP id 84mr24719221pfo.168.1523153992988; Sat, 07 Apr 2018 19:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523153992; cv=none; d=google.com; s=arc-20160816; b=ulgg0/cI1BV41bC3nAFug6Hbno8W70T1zdJOOsHbhq1o4mBmaDuPZ32MQ59qso1VhX RYsISsRDypKMjNr8tBAIFeKzwcounJfv/UAQIN03kSW3RE4vOM69P8977rqwLNa15Uq6 8/6cGrdxYZ77k9Zbe84T5l7KpOpeVp4PNZBTeb+NrQSXNWTXtA9p4+xBaUJqk5uX1kMI hljVIHhKuCtz9wG9XOprygxY5f8IkZOJ/w3GI3cQasoyOjhtmIMvV8KvpWhirpf66Bp7 Yk9qw0JO/I9c2vHTVGE0d4VpDULjLN3bhsEbW6nRqlcwyzgAypjBPI1GmbYgrFc1+rV9 XnZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=olRN7ekyZi2TPInNq0ySbUUolnrvhhUp0Tw5vl+GQJ0=; b=DPw6jTkF/Buro0DUNwpJTpJYBw1eYEIp7/mSpPJeQThPAeDVwwBMQTNvA8Ze1+UFse +46b/xq3eG0keqAazSp/SCsyo6p84LK2LOe1a0LXFF+Ptc8PCk0QNotaLS6Ff4urfHSA G6VqxKiAth1s+6pB19hNfx0sHQxkqygVBvaZI+70jAsR93jtgO7r7Q9Mv2o2p2/WkqcF HYi2mW+b6CHG64x+dYrnIKKKg3H7coCOi3Fj1rd37wKNQcPyff1f5LWjPeR+aMkpe7L5 12r+23BeNkaaszX5qAqp9cfEDMD6M+GsrfBit5coqGBkL46ir47QuTTFc4QKg3duXN4k AQgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CKE5YOvB; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si10430806pfg.414.2018.04.07.19.19.15; Sat, 07 Apr 2018 19:19:52 -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=@gmail.com header.s=20161025 header.b=CKE5YOvB; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752487AbeDHCQg (ORCPT + 99 others); Sat, 7 Apr 2018 22:16:36 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:35614 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbeDHCQf (ORCPT ); Sat, 7 Apr 2018 22:16:35 -0400 Received: by mail-pl0-f66.google.com with SMTP id 61-v6so2990605plb.2 for ; Sat, 07 Apr 2018 19:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=olRN7ekyZi2TPInNq0ySbUUolnrvhhUp0Tw5vl+GQJ0=; b=CKE5YOvB3qcnORDRKG2Z3yQiL2T7ETdbfQlqbL/27bpGXwphBaSee/5XV+9OVbJKPV uwFmt/LXsTU1i57kG5F5nN2wlNCcQuHBfLh8VP20OWujl+Prhxf1SUAg3g4y1kryqBS9 z2eiqQWmJJUqPr/jwBRRRCujKPbB/wzoaw2KDUF/HUNKDKe1qkM1ZAi+KEm/g08D+XF6 DD+amrSFqfBHHvB7CAUfB+yi01eW/4w/cjNlctyu2NhucOGOmN5kFRhtXSUYZXDXCxYw QPuXVNQJun2oe2ow46F+bqt3l3skZejMCq5ebCOHOrzHlsA520sbTN5jQ1HWl3cPLp/g c7fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=olRN7ekyZi2TPInNq0ySbUUolnrvhhUp0Tw5vl+GQJ0=; b=TnK/cwQvSeQUYjshBjSEtOm3os4QRBuu5GYkAiJ8/3YuwURZc6ERIJ5JKTZx/unWcW b/2PamZi5iAHP68oOO88KjUk0tAtY9tNODjn7qe9PIOjWqbcRw4A66ENN+i6Diiuk48I 5Q4Edonj0SUMqq2c/cPlS5lExvQAISuBNWfGw3CBcgEVT0cyMxzUDm1TDS/zbwlrBVNB lgs6oPumA20r30Z6Jc7HI5ajSw/6GpMkJbTQeWK66AFi0XftGgofh13YVJYUk5RmhDl4 PIvKlk/xDSsDcUHU/XHekJ9G/yyDMTTDFd+LLNZ+bBqQ7jPpPfjK3IUKnlb9PHRT0Hlu 1miQ== X-Gm-Message-State: AElRT7HsbjpS3Zc486y+0+KOueAvzZYfFRVyxY7qRUA/KPnT3o4Ca4Oy DOEi8wvqU1HziF22x8G8pe8BOw== X-Received: by 2002:a17:902:bf41:: with SMTP id u1-v6mr32438319pls.236.1523153794481; Sat, 07 Apr 2018 19:16:34 -0700 (PDT) Received: from bj03382pcu.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id u13sm29273631pfd.112.2018.04.07.19.16.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 07 Apr 2018 19:16:33 -0700 (PDT) From: Zhaoyang Huang X-Google-Original-From: Zhaoyang Huang To: Steven Rostedt , Ingo Molnar , linux-kernel@vger.kernel.org, kernel-patch-test@lists.linaro.org Subject: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN Date: Sun, 8 Apr 2018 10:16:23 +0800 Message-Id: <1523153783-20579-1-git-send-email-zhaoyang.huang@spreadtrum.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't choose the process with adj == OOM_SCORE_ADJ_MIN which over-allocating pages for ring buffers. Signed-off-by: Zhaoyang Huang --- kernel/trace/ring_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 5f38398..1005d73 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -1135,7 +1135,7 @@ static int rb_check_pages(struct ring_buffer_per_cpu *cpu_buffer) static int __rb_allocate_pages(long nr_pages, struct list_head *pages, int cpu) { struct buffer_page *bpage, *tmp; - bool user_thread = current->mm != NULL; + bool user_thread = (current->mm != NULL && current->signal->oom_score_adj != OOM_SCORE_ADJ_MIN); gfp_t mflags; long i; -- 1.9.1