Received: by 10.213.65.68 with SMTP id h4csp1164595imn; Wed, 14 Mar 2018 11:29:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELsihPMUS3uwRSAD4jTA9NZ9Hb10gC50mZJTj8xuOPLRcsy2iI69SgGO6MbOX2r0WKUQFA7T X-Received: by 2002:a17:902:3041:: with SMTP id u59-v6mr4872290plb.115.1521052174557; Wed, 14 Mar 2018 11:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521052174; cv=none; d=google.com; s=arc-20160816; b=TTgX1Yo6DjmyUk36IiLuvZ95IjDNL+AuJUaM+7uWkPykE4f2qr/MbN00gMdnEENpm4 27ztWd7EtEO7X/yz7hwzZRnO8qS9+UjWbt6e2xg8bLxHx+mtFbQwV4JfefMFsdej+ff3 MGpAe3rQe9KxR62+sMffOa1U6rVhaSAy+boN7Sa/GV+/TYPT76gBUYSeN2kwfd3daNQq ZOwnjXDrRXUG3sKLo3YJTKkWiTICUQZgJvxELNanRy3YVE8aBXeR9X60XyOLGSEIbdN2 10Zmn4EBYd2vT13GrM6NI7SY7U0bbxuOWqa6oVOF/eiIrhLsCvuw6aBJA7Gq95TWpf6+ PEAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=/NVhMONz8880Afvl8PUXU2Pymc0Re6O9WYJnar4yVqw=; b=etvtQH7W7grq8elo+iGCpAnAcXv6l5nQUq9r5V7LmQHG5+NOniAJJla+FMk++fs6+a efCJck2Is4QTtWyFaAyzsRX3mmZPixkpTaf1T/wrcrXTK9BF4mI85VoUuT1dwncKWYMi JhiHj+fHFqRPqRbwJPq+lqptG2Rg8NHD4S8IdZtr59MOhO/ZYG+MSeaCx2zZn9eQqzXS dlQzQ7gGU5nAV41bZIPHYGdNCZo4sICsNcJV6M4E6+PpbyoUix1BEvp1x1ftnXQHhSu2 KS7Q0fkAw5ALwmvmHgyeizVH3olumeNUGYgZNhe4ZqjbQGgKlKq4rCwRC+otgYCPRP/J jgcA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si2198671pge.478.2018.03.14.11.28.50; Wed, 14 Mar 2018 11:29:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbeCNSZi (ORCPT + 99 others); Wed, 14 Mar 2018 14:25:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47478 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbeCNSZh (ORCPT ); Wed, 14 Mar 2018 14:25:37 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 86486F18; Wed, 14 Mar 2018 18:25:36 +0000 (UTC) Date: Wed, 14 Mar 2018 19:25:36 +0100 From: Greg KH To: "Michael S. Tsirkin" Cc: Or Idgar , linux-kernel@vger.kernel.org, arnd@arndb.de, oidgar@redhat.com, ghammer@redhat.com, Or Idgar Subject: Re: [PATCH v5] drivers/misc: vm_gen_counter: initial driver implementation Message-ID: <20180314182536.GA14504@kroah.com> References: <20180301142215.11812-1-idgar@virtualoco.com> <20180313190617-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180313190617-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 13, 2018 at 07:40:51PM +0200, Michael S. Tsirkin wrote: > I think it's a good idea to use sysfs for this. However, > there are a couple of missing interfaces here: > > 1. Userspace needs a way to know when this value changes. > I see no change notifications here and that does not seem right. How can these change? > 2. Userspace needs to be able to read these without > system calls. Ick, what? Why not? > Pls add mmap support to the raw format. For a single integer? Why do you need mmap for this? What is so "performant" that needs to touch a sysfs file? > (Phys address is not guaranteed to be page-aligned so you will > probably want an offset attribute for that as well). Ick ick ick, that's why it's good to just stick with a sysfs file. Have you tested just how long this takes to see if the open/read/close is really the bottleneck, or if the io on reading the value is the bottleneck? thanks, greg k-h