Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp5081242pjb; Mon, 27 Jul 2020 12:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsR/YsdvWcYjeOuG4ZItY/qWQfePH/+VA1bew2zHq4DGjpBVd25d5tWb4a/4S6zkDTL6SZ X-Received: by 2002:a17:906:3850:: with SMTP id w16mr23534192ejc.205.1595878002216; Mon, 27 Jul 2020 12:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595878002; cv=none; d=google.com; s=arc-20160816; b=mY2ReHp1HlseFGWNPpkYvToBhtKsj4UgEjBW3TaHAdKXjdL2nOCtT0Rlicf9Ee6CMh g2RM+DDthHYhxkIkx7WC9ULADD7sFrO1GuRs81SPvSKalObtaUDMxsMb6bGliM0hl9AO lDfmUlYOLk5bxq+aiFr4QmzS1WqUIwm766u4QQtvtPNIicHEf6JiD3th/5x9QoEHDcXu YhMdGK+gj6+TRmHtS66mDgR+Xm6TXZhG791YK9251CUenArolqYQa/Rf1oobNqNRtR0M LR5kOGT3wCu95LWj2YWv42x1hg7lYjCtOY1lWsGBPKnk99+P0WY5MzFKKmY6lFyf17we CuiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:smtp-origin-cluster :cc:to:smtp-origin-hostname:from:smtp-origin-hostprefix :dkim-signature; bh=1iftgx7N4hovl25oCFGN0SNpDQe3eCttfNkL/T08aeE=; b=kwOkP9yrLVgFzG/+GXZpa6Wqnj1BNTEnFa6mZ6PK3UIXECs5k0BxqMeRyxoZe1GsNZ VS6SZtO5iV/H/EBALP/yeyDjDStf23rUQA/KUXkO/mv4UZyven7mpPfYXgGfJKao23yN 2qJg/n7ofos0TwHvPLPEIYYk3dnBegRYjcU+2VXexM2x30tIbjvPq3QheM3NFFgeK9nQ l4sUKppON5TslQ6uQ1fySsALEQOMRcpgI5Y10FhkLrKMioeB1XRwqsSJvPDtP20dMXoY kUwQhTcink0/XXBcSH7Of9SGmnpCtsqm83TXl4d6542eL7sflI/o3qbMoHeRR6Plr6E7 zFVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=hqwio7CD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si6172247edv.490.2020.07.27.12.26.20; Mon, 27 Jul 2020 12:26:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=hqwio7CD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730865AbgG0SsB (ORCPT + 99 others); Mon, 27 Jul 2020 14:48:01 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:39014 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731707AbgG0SpZ (ORCPT ); Mon, 27 Jul 2020 14:45:25 -0400 Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06RIf66N020258 for ; Mon, 27 Jul 2020 11:45:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=1iftgx7N4hovl25oCFGN0SNpDQe3eCttfNkL/T08aeE=; b=hqwio7CDsr7sysjmzlwRDJw1TdUz4YDDMQlRAWFZU+GyFYNTvLacYLe8Q9KLItsVaPzh yVep+Usz4IWsa3G6nZdu6OSf2S+o/wiSu7HYOYJ+D2YehVgewWDoI+lYBSgp4P38jXhb PODwj6k+HjH81tus/jJ1FMLFVA20sSV3PxM= Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com with ESMTP id 32h4k25uye-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 27 Jul 2020 11:45:25 -0700 Received: from intmgw003.06.prn3.facebook.com (2620:10d:c085:208::f) by mail.thefacebook.com (2620:10d:c085:21d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 27 Jul 2020 11:45:21 -0700 Received: by devvm1096.prn0.facebook.com (Postfix, from userid 111017) id 2F2091DAFEAF; Mon, 27 Jul 2020 11:45:11 -0700 (PDT) Smtp-Origin-Hostprefix: devvm From: Roman Gushchin Smtp-Origin-Hostname: devvm1096.prn0.facebook.com To: CC: , Alexei Starovoitov , Daniel Borkmann , , , Roman Gushchin Smtp-Origin-Cluster: prn0c01 Subject: [PATCH bpf-next v2 31/35] bpf: runqslower: don't touch RLIMIT_MEMLOCK Date: Mon, 27 Jul 2020 11:45:02 -0700 Message-ID: <20200727184506.2279656-32-guro@fb.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200727184506.2279656-1-guro@fb.com> References: <20200727184506.2279656-1-guro@fb.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-27_13:2020-07-27,2020-07-27 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 lowpriorityscore=0 clxscore=1015 adultscore=0 malwarescore=0 bulkscore=0 phishscore=0 priorityscore=1501 mlxlogscore=931 mlxscore=0 spamscore=0 suspectscore=13 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007270126 X-FB-Internal: deliver Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since bpf is not using memlock rlimit for memory accounting, there are no more reasons to bump the limit. Signed-off-by: Roman Gushchin --- tools/bpf/runqslower/runqslower.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tools/bpf/runqslower/runqslower.c b/tools/bpf/runqslower/run= qslower.c index d89715844952..a3380b53ce0c 100644 --- a/tools/bpf/runqslower/runqslower.c +++ b/tools/bpf/runqslower/runqslower.c @@ -88,16 +88,6 @@ int libbpf_print_fn(enum libbpf_print_level level, return vfprintf(stderr, format, args); } =20 -static int bump_memlock_rlimit(void) -{ - struct rlimit rlim_new =3D { - .rlim_cur =3D RLIM_INFINITY, - .rlim_max =3D RLIM_INFINITY, - }; - - return setrlimit(RLIMIT_MEMLOCK, &rlim_new); -} - void handle_event(void *ctx, int cpu, void *data, __u32 data_sz) { const struct event *e =3D data; @@ -134,12 +124,6 @@ int main(int argc, char **argv) =20 libbpf_set_print(libbpf_print_fn); =20 - err =3D bump_memlock_rlimit(); - if (err) { - fprintf(stderr, "failed to increase rlimit: %d", err); - return 1; - } - obj =3D runqslower_bpf__open(); if (!obj) { fprintf(stderr, "failed to open and/or load BPF object\n"); --=20 2.26.2