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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 A1319C00A89 for ; Mon, 2 Nov 2020 14:08:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7EC0D2465D for ; Mon, 2 Nov 2020 14:08:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gmSIVHcN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EC0D2465D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 823786B005D; Mon, 2 Nov 2020 09:08:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7AAD46B0068; Mon, 2 Nov 2020 09:08:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6730E6B006C; Mon, 2 Nov 2020 09:08:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 3556F6B005D for ; Mon, 2 Nov 2020 09:08:44 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B95E4181AEF00 for ; Mon, 2 Nov 2020 14:08:43 +0000 (UTC) X-FDA: 77439658926.06.boats40_5f15a90272b0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 9C9FD10040CBC for ; Mon, 2 Nov 2020 14:08:43 +0000 (UTC) X-HE-Tag: boats40_5f15a90272b0 X-Filterd-Recvd-Size: 2642 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Mon, 2 Nov 2020 14:08:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rXbYTzMH5+21up+d520jyOeCTieBV+RqI0Jv3IRaYFc=; b=gmSIVHcNIL4p11AY1fEnKWj9v8 eLFcihyAiXIwhxD2Yt90R4yd7VeN/sp3UjX2iAmc+Vdjp6qRK2kLAfvYX/GKf3GZU9OBlETYGlfIF 9py3qr9JwnMX8SyERDWt+lSYSsTZfk2x3+Hl9wGr5vFJpA3oROSmifFRA/sQLPQY9yjcp0AJP6MWP Fvo/x8qsvnovciQ4/h2707YJukPhixmvGAx4U1hFM71qsNwsU235fsf2JdylJrMN6s9Gazy4EiHf8 3gvgmgYhcT1is0C/gjk66wi107NUoEU2gslaM2IdBWzEP0Zl9u0AX0I8LTLaM+3K/iwG8sKCuLOs0 DpQkFtDw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZaVg-0004gC-W5; Mon, 02 Nov 2020 14:08:37 +0000 Date: Mon, 2 Nov 2020 14:08:36 +0000 From: Matthew Wilcox To: Greg Kroah-Hartman Cc: Joe Perches , Hugh Dickins , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] mm: shmem: Convert shmem_enabled_show to use sysfs_emit_at Message-ID: <20201102140836.GJ27442@casper.infradead.org> References: <20201101204834.GF27442@casper.infradead.org> <616b92af9378e9f9697555074bba1e377450477f.camel@perches.com> <20201101211910.GG27442@casper.infradead.org> <20201101220604.GI27442@casper.infradead.org> <20201102133343.GA1011963@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201102133343.GA1011963@kroah.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 02, 2020 at 02:33:43PM +0100, Greg Kroah-Hartman wrote: > > Oh, ugh, sysfs_emit() should be able to work on a buffer that isn't > > page aligned. Greg, how about this? > > How can sysfs_emit() be called on a non-page-aligned buffer? It's being > used on the buffer that was passed to the sysfs call. > > And if you are writing multiple values to a single sysfs file output, > well, not good... See shmem_enabled_show() in mm/shmem.c (output at /sys/kernel/mm/transparent_hugepage/shmem_enabled on your machine). I don't claim it's a good interface, but it exists.