Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32225387rwd; Fri, 7 Jul 2023 10:24:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHLFHcCtXsjWlw/stKLJWWVo4ruAzXkmIXD4p9mV56/4Ishpja4l95QXNXjk/KGsfuN4KPl X-Received: by 2002:a17:902:ec88:b0:1b8:1687:b53 with SMTP id x8-20020a170902ec8800b001b816870b53mr5778731plg.26.1688750652750; Fri, 07 Jul 2023 10:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688750652; cv=none; d=google.com; s=arc-20160816; b=ScA6N9KKrtSasguQxliobj2bn9fwLqVh85cNPCmmivI9G1zrFqrgDigrjPbcBAjRXY 3GobjgF4Q7FqvIM4/OEbhURa2Dp6oOpwTDVZ6AHfQB9HKs9ejS5/Lrwx4Pmc7Quwr2lJ 3UZSSpauyB5pL7gZqeIP7HHJgY0VEM9IHkptydCmNccWlwIA/WZIwOJ1CqVOCnF6L6Xv lbt8OLaljlKOJEhEvr7pa5Y850IKaan8mw865IaRkcC+95Ntk8JeZzaMImWkHjnd25FZ 5WYGYPF8YUotQPlOnW3+eybjbxiYBRy+GbaQg6SYCMQeA9KCp336HXI6+HXLNdvUBiJi crrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nIecGmLz1MlH+va/QFWif8XrmmDnlbqD98dJPxGNA64=; fh=GZ8AjSm4D/pvo/TqdQfRmssmRrWh0l+thXU+IX781EA=; b=ldEj1Fkr244cNR43VeBSKpsDUMBT9eIaYv2MIxZmD4NM+NEv32k2snY8DibOgLzWxq 3J0rJBC6WWKS6WxG2BN7qnk2jrA4qfm7kQRQnFfqPpyT8FaxqxHCg4nurswixU6Y4WY5 77KQkNMNdiCfYLyrZk0xZcdvDaBxKlHRmiNM0kcq+/mXSzctT/h4QM7eQF23dlEWLBfB rlOgPHmg4lD8BzscX/N3+uoT98zH7hqc0Ynnu++gb5P9FDD4jhF9Cj5jLCNZLlbH1eB1 0a3ZbZ48k2YjKXS9itHY8sXqhJT/Af7AfctG/MGduso9IwsTcxKu4uI3PvpB0eWGXu/E CKog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=OwYvnUtj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a170903120c00b001b89bab468esi4294837plh.107.2023.07.07.10.23.59; Fri, 07 Jul 2023 10:24:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=OwYvnUtj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232941AbjGGREn (ORCPT + 99 others); Fri, 7 Jul 2023 13:04:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233007AbjGGREk (ORCPT ); Fri, 7 Jul 2023 13:04:40 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C551268C for ; Fri, 7 Jul 2023 10:04:33 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b5c231c23aso34797991fa.0 for ; Fri, 07 Jul 2023 10:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688749472; x=1691341472; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nIecGmLz1MlH+va/QFWif8XrmmDnlbqD98dJPxGNA64=; b=OwYvnUtjF7ahSmumagnned4jibeNbglj/gEaLa7engmpvPADf/SqNog7qaoecsz+bz qg272OVvIl8aMDi2KbW3ytwr+UPSdYA5SP9MrudFeKxwLWHZXx2effACfixn4ba85enw jBzBE2qnFUSmNTgX6U7Rp+WH0qJkZGnEiVFAnG0FwyYy2ejrUbraUHaWx8bWzt9WBJQn Dk2zXG2eO0XAU7pPdSQ/XuKdulSawH0pxfHmrCBkgLzQSjv3yCseholEErz9vmDBgBmh 0yJAAlFBtczoky1ZBsx/izYr7EvqD7ojK8IrH0KhnBB/E8GbnkJG5VUMhWejXA2emDIV LoyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688749472; x=1691341472; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nIecGmLz1MlH+va/QFWif8XrmmDnlbqD98dJPxGNA64=; b=V+uRXEqWN2uBpT1l9cvzFZoz3krZFouSmxu/ifcHRHKWpiM1vHVa+ss6bQwO3/tgLd kG8ReT/rtBHvnlkIRIhLfA4hP3NZCCQBS1mMMdS5Kw26M0tAho32nlm32pavPfyknMrP abNi38m4jOc/plo8ZIMVeR285aX34T6JI178IvaA7uONOcUrS/mrlRITVCjJpBMQG19/ 00fBkcYctFo5O6MLRAFWIxBoK/UCHKaCYnoGSpXxxQnEHFIYrpj0QSQXW8Fm4IrxB+Hh YV9c4/3CG4q9gd4P6pDQnMEKJ1YfUg7cNhs89PPWW/J9OHRFLwXCA4i4sIlfYFTD8nMd W4gA== X-Gm-Message-State: ABy/qLZSa/nmrahKT6nbbolSs9hkBg6APTiVe3D5EmgOaP8T5UTtvwXo kVgH86B0atcKGMj2hljQ0woJPSs2N9CLnUhG32LMGg== X-Received: by 2002:a2e:9b15:0:b0:2b6:d8cf:2f44 with SMTP id u21-20020a2e9b15000000b002b6d8cf2f44mr4204788lji.13.1688749471534; Fri, 07 Jul 2023 10:04:31 -0700 (PDT) MIME-Version: 1.0 References: <20230706225037.1164380-1-axelrasmussen@google.com> <20230706225037.1164380-8-axelrasmussen@google.com> In-Reply-To: From: Axel Rasmussen Date: Fri, 7 Jul 2023 10:03:55 -0700 Message-ID: Subject: Re: [PATCH v3 7/8] selftests/mm: refactor uffd_poll_thread to allow custom fault handlers To: Peter Xu Cc: Alexander Viro , Andrew Morton , Brian Geffon , Christian Brauner , David Hildenbrand , Gaosheng Cui , Huang Ying , Hugh Dickins , James Houghton , "Jan Alexander Steffens (heftig)" , Jiaqi Yan , Jonathan Corbet , Kefeng Wang , "Liam R. Howlett" , Miaohe Lin , Mike Kravetz , "Mike Rapoport (IBM)" , Muchun Song , Nadav Amit , Naoya Horiguchi , Ryan Roberts , Shuah Khan , Suleiman Souhlal , Suren Baghdasaryan , "T.J. Alumbaugh" , Yu Zhao , ZhangPeng , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 7, 2023 at 6:42=E2=80=AFAM Peter Xu wrote: > > On Thu, Jul 06, 2023 at 03:50:35PM -0700, Axel Rasmussen wrote: > > @@ -247,9 +245,13 @@ static int userfaultfd_stress(void) > > { > > void *area; > > unsigned long nr; > > - struct uffd_args args[nr_cpus]; > > + struct uffd_args *args; > > uint64_t mem_size =3D nr_pages * page_size; > > > > + args =3D calloc(nr_cpus, sizeof(struct uffd_args)); > > + if (!args) > > + err("allocating args array failed"); > > This is trivial, but I think I requested a "free" (or keep it allocate on > stack) in previous version but it didn't get a response on why we cannot > and it kept going.. could you help explain? Oh, sorry! I had meant to change this after our discussion, and simply overlooked it while reworking the patches. I'll include this change in a v4 which also addresses e.g. the comments on commit 1. > > -- > Peter Xu >