From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 271D7C43460 for ; Fri, 30 Apr 2021 06:05:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F175861456 for ; Fri, 30 Apr 2021 06:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229712AbhD3GGg (ORCPT ); Fri, 30 Apr 2021 02:06:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:56910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbhD3GGf (ORCPT ); Fri, 30 Apr 2021 02:06:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DFF5761424; Fri, 30 Apr 2021 06:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619762747; bh=hqRzyDrn0g03rzVlU0l+LtjC2qwuU1eJezgKOZYtGLk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fy98sGODFAY6t0XGklcLMemfXkznN4XNdok3p1cL8YkvWQ7Oaewr8qcf/gbgFZ5j4 XgNp3kN3BBPHlQ7FC5DFGNzsAYHNce5vQD9CNExU2VwbYf77OZLhGMNJ0JRrpBkFOJ wratqWZ/T0qVLvT1k8dbeemExr2TQpSToEv1fP4s= Date: Fri, 30 Apr 2021 08:05:45 +0200 From: "gregkh@linuxfoundation.org" To: Dave Hansen Cc: "Song Bao Hua (Barry Song)" , "tiantao (H)" , "corbet@lwn.net" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Rafael J. Wysocki" , Peter Zijlstra , Valentin Schneider , Dave Hansen , Daniel Bristot de Oliveira Subject: Re: [PATCH 1/2] CPU, NUMA topology ABIs: clarify the overflow issue of sysfs pagebuf Message-ID: References: <1619679819-45256-1-git-send-email-tiantao6@hisilicon.com> <1619679819-45256-2-git-send-email-tiantao6@hisilicon.com> <146e051b-603c-a6d3-43d8-d083cf2c8119@intel.com> <602918a1e2214ea7bd0890a751975566@hisilicon.com> <7c663f7e-07e0-6d95-3012-6e31a1b78f7e@intel.com> <4bf6870f7f3942398e4d1fdaa42184c7@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 29, 2021 at 03:38:39PM -0700, Dave Hansen wrote: > On 4/29/21 3:32 PM, Song Bao Hua (Barry Song) wrote: > > $ strace numactl --hardware 2>&1 | grep cpu > > openat(AT_FDCWD, "/sys/devices/system/cpu", > > O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 > > openat(AT_FDCWD, "/sys/devices/system/node/node0/cpumap", O_RDONLY) = 3 > > openat(AT_FDCWD, "/sys/devices/system/node/node1/cpumap", O_RDONLY) = 3 > > openat(AT_FDCWD, "/sys/devices/system/node/node2/cpumap", O_RDONLY) = 3 > > openat(AT_FDCWD, "/sys/devices/system/node/node3/cpumap", O_RDONLY) = 3 > > > > If we move to binary, it means we have to change those applications. > > I thought Greg was saying to using a sysfs binary attribute using > something like like sysfs_create_bin_file(). Those don't have the > PAGE_SIZE limitation. But, there's also nothing to keep us from spewing > nice human-readable text via the "binary" file. That is correct.