From owner-freebsd-hackers@freebsd.org Sun Dec 13 19:40:58 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10D334C1D65 for ; Sun, 13 Dec 2020 19:40:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CvFHs5Cn5z4pC2; Sun, 13 Dec 2020 19:40:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BDJeeQl069344 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 13 Dec 2020 21:40:43 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BDJeeQl069344 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BDJeeFs069343; Sun, 13 Dec 2020 21:40:40 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 13 Dec 2020 21:40:40 +0200 From: Konstantin Belousov To: Alan Somers Cc: Warner Losh , Ian Lepore , FreeBSD Hackers Subject: Re: char devices without SI_UNMAPPED? Message-ID: References: <6dd927984d69ef0e95e1e90651bcd8087bc4eec4.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CvFHs5Cn5z4pC2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Dec 2020 19:40:58 -0000 On Sun, Dec 13, 2020 at 12:20:49PM -0700, Alan Somers wrote: > On Sun, Dec 13, 2020 at 11:20 AM Warner Losh wrote: > > > > > > > On Sun, Dec 13, 2020 at 11:18 AM Ian Lepore wrote: > > > >> On Sun, 2020-12-13 at 10:27 -0700, alan somers wrote: > >> > I'm trying to exercise the aio code that handles character devices > >> > that > >> > don't set the SI_UNMAPPED flag. But I can't find any. Are there any > >> > remaining character devices that don't allow unmapped I/O? > >> > > >> > -Alan > >> > > >> > >> I assume you mean disk-like devices? Probably mmcsd, flash/at45d, > >> flash/mx25l. > >> > > > Hm. I don't have any of those. > > > > > > There are times that it's disabled administratively as well, but that may > > be on a per-I/O basis. > > vfs.zfs.vol.unmap_enabled: 1 > > > > This one doesn't seem to work. It looks like the only functionality it > gates these days is DIOCGDELETE. > > > > vfs.unmapped_buf_allowed: 1 > > > > Well, this one works. Thanks for the tip. Unfortunately, it's a tunable, > so I can't use it for any kind of automated testing. There is enough geoms which do not support unmapped bios, even if only in some configurations. Recursively grep for G_PF_ACCEPT_UNMAPPED in sys/geom to see what I mean. After all, an option for geom_nop should be trivial, to force all bios to map, instead of inheriting from the lower provider.