Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1486939imm; Wed, 20 Jun 2018 20:00:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLB3niP5JMle1l3K9aRY6KH1NAZErw7GdEU8WIVp+39gauegXsdTT0AyKUI1AwyQUHBLt10 X-Received: by 2002:a63:7707:: with SMTP id s7-v6mr21318570pgc.426.1529550004346; Wed, 20 Jun 2018 20:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529550004; cv=none; d=google.com; s=arc-20160816; b=N4eHclbKXjYyOQ2xzIiLRYI9DKRYeS5X2Mbg0kIUwTO+qDzwMDFLfDSABySfirmZco XKFBFL7iZdAlNZn5y91sfzjtqrHrT0YSQrzCvA+kJYy3Nl3WfQtavk+Jl1vin4ybcbAw Sz6TRmJiP8VPEiOd0oEpNRT2mjEWWvI+RYkl/CvZ4RD5YPv2uaCtONr2JJ+1bIbH5LPk kGUXaaCc9Nj6SCHFAdn/mvJPSgkpMMaWT61zkb5v+1GHDC5FxKONWp+iqMGqVU2nAoRD +DMbAKAcV9+6d1Sdpclws+plujqkSGNEjOLZjhAF39/Wq7C7zGKQzaeIehF7tLpbUngD YzCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=xiB0KNq38BgdgXMHVyQuhWY8oDLW8w8aInhjYROv3gs=; b=s9rTc9oW5abcz22IHAAs8z5mq4NOFUlH1u/cGg42P+evGEVlvRI+T8rc07W5RGOkFh mGP+sSHrGbeDX2TdXxQ71ySPeRc9YhRx4ledKS3uRT/u4RVnoItbPVcC856w9X2IySsQ JIGSD0LCgSmD6LZNMTC3HZMLIbo7JvBrRlocXk9xtFY7VhWYcsrYIVZWKmOi7fY/Aqsq IC3crWRvLHI9EA9pjCeh/m58hezjnKZgsmS+wMw5h/DkhqFc72cKc/qr5RbkIhcZm456 BnUzo8fKcN+L0Wa3tuiEn8Rn8psLr8k2aZ6fcLUO9Xzq1o0/DFjtJRssr6Gxmyb78ADD zTzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nrx3NUuY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13-v6si3715826plr.196.2018.06.20.19.59.50; Wed, 20 Jun 2018 20:00:04 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Nrx3NUuY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754560AbeFUC7M (ORCPT + 99 others); Wed, 20 Jun 2018 22:59:12 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:39983 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754284AbeFUC7L (ORCPT ); Wed, 20 Jun 2018 22:59:11 -0400 Received: by mail-qk0-f193.google.com with SMTP id b129-v6so986916qke.7 for ; Wed, 20 Jun 2018 19:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=xiB0KNq38BgdgXMHVyQuhWY8oDLW8w8aInhjYROv3gs=; b=Nrx3NUuY/x3AvIiCAl5Z31svAqnm6SkXpf7McUJIGV8Kj9Nu5wYbtYe49tOgySWp9m VcPfb6NpQ10vDgR5oc4pv92OSfcuG+q4JNoxVxLTg76rDh4naO9fVuAZxpMHQ8JaUEk9 Sy/A8OLG/TRUstN/scibNVROm1aCeImYlpBps= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=xiB0KNq38BgdgXMHVyQuhWY8oDLW8w8aInhjYROv3gs=; b=tJUkYCwZubA1gJbbY5MIKQvPe4/vfahS6+tr99EUie6rhNHlRBN09CHGftvi86FZgo 5agtdmkbzHjqoZN6fSKtuZuoAoXq1Y9Noz+n+ZGhMw6HA+dM68ZwLFxFHi2pGs8Y6mDa v4NUfrtU+SbT/OApGSlr/Qdo4cZFQ3F2LLNEDC3r26A6f8Tah1pJ8x2K3pEuAB3z9ui0 6xXwL+/vh1CUKGKG1Wav9GmeZO4+DI+/cYx0osWO2O8pKl8UQxQRwlOIHkZxnSlCFIBl 2KCqpwEiJTk+kTUC9fp+rwzKsF5qkZBUEWdWI151/40Ax0ExhK3fTTTyL1DbGU631asX fQvA== X-Gm-Message-State: APt69E1dzUMxwh+rig+poGOkjSTopUl2Ed+cSYsOzG8i6T0fl2q62OBd op4twgFx0WrOccL1jrkk7afYVQ== X-Received: by 2002:ae9:e004:: with SMTP id m4-v6mr5617855qkk.436.1529549950221; Wed, 20 Jun 2018 19:59:10 -0700 (PDT) Received: from xanadu.home (modemcable228.104-82-70.mc.videotron.ca. [70.82.104.228]) by smtp.gmail.com with ESMTPSA id a12-v6sm2326282qtk.57.2018.06.20.19.59.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 19:59:09 -0700 (PDT) Date: Wed, 20 Jun 2018 22:59:08 -0400 (EDT) From: Nicolas Pitre To: Adam Borowski cc: Greg Kroah-Hartman , Dave Mielke , Samuel Thibault , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/4] have the vt console preserve unicode characters In-Reply-To: <20180621014317.ebslk3gwvpq3k6sq@angband.pl> Message-ID: References: <20180617190706.14614-1-nicolas.pitre@linaro.org> <20180619130953.bxil552igfkckjmr@angband.pl> <20180621014317.ebslk3gwvpq3k6sq@angband.pl> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1898205314-1529549949=:16670" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1898205314-1529549949=:16670 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 21 Jun 2018, Adam Borowski wrote: > On Tue, Jun 19, 2018 at 11:34:34AM -0400, Nicolas Pitre wrote: > > On Tue, 19 Jun 2018, Adam Borowski wrote: > > > Thus, it'd be nice to use the structure you add to implement full Unicode > > > range for the vast majority of people. This includes even U+2800..FF. :) > > > > Be my guest if you want to use this structure. As for U+2800..FF, like I > > said earlier, this is not what most people use when communicating, so it > > is of little interest even to blind users except for displaying native > > braille documents, or showing off. ;-) > > It's meant for displaying braille to _sighted_ people. And in real world, > the main [ab]use is a way to show images that won't get corrupted by > proportional fonts. :-þ ⠨⠺⠑⠇⠇⠂ ⠥⠎⠊⠝⠛ ⠇⠁⠞⠑⠎⠞ ⠨⠨⠃⠗⠇⠞⠞⠽ ⠊⠞ ⠊⠎ ⠏⠕⠎⠎⠊⠃⠇⠑ ⠞⠕ ⠞⠽⠏⠑ ⠁⠝⠙ ⠙⠊⠎⠏⠇⠁⠽ ⠝⠁⠞⠊⠧⠑ ⠃⠗⠁⠊⠇⠇⠑ ⠕⠝ ⠁ ⠃⠗⠁⠊⠇⠇⠑ ⠞⠑⠗⠍⠊⠝⠁⠇ ⠕⠝⠉⠑ ⠞⠓⠊⠎ ⠏⠁⠞⠉⠓ ⠎⠑⠗⠊⠑⠎ ⠊⠎ ⠁⠏⠏⠇⠊⠑⠙ ⠞⠕ ⠞⠓⠑ ⠅⠑⠗⠝⠑⠇⠂ ⠊⠗⠗⠑⠎⠏⠑⠉⠞⠊⠧⠑ ⠕⠋ ⠞⠓⠑ ⠁⠉⠞⠥⠁⠇ ⠉⠕⠝⠎⠕⠇⠑ ⠋⠕⠝⠞ ⠊⠝ ⠥⠎⠑⠲ ⠨⠁⠝⠙ ⠋⠕⠗ ⠞⠓⠁⠞ ⠺⠑ ⠥⠎⠑ ⠉⠕⠗⠗⠑⠎⠏⠕⠝⠙⠊⠝⠛ ⠥⠝⠊⠉⠕⠙⠑ ⠉⠓⠁⠗⠁⠉⠞⠑⠗⠎⠲ > > If the core console code makes the switch to full unicode then yes, that > > would be the way to go to maintain backward compatibility. However > > vgacon users would see a performance drop when switching between VT's > > and we used to brag about how fast the Linux console used to be 20 years > > ago. Does it still matter today? > > I've seen this slowness. A long time ago, on a server that someone gave an > _ISA_ graphics card (it was an old machine, and it was 1.5 decades ago). > Indeed, switching VTs took around a second. But this was drawing speed, not > Unicode conversion. > > There are three cases when a character can enter the screen: > * being printed by the tty. This is the only case not sharply rate-limited. > It already has to do the conversion. If we eliminate the old struct, it > might even be a speed-up when lots of text gets blasted to a non-active > VT. That's a good point. > * VT switch > * scrollback > > The last two cases are initiated by the user, and within human reaction time > you need to convert usually 2000 -- up to 20k-ish -- characters. The > conversion is done by a 3-level array. I think a ZX Spectrum can handle > this fine without a visible slowdown. In the scrollback case, currently each driver is doing its own thing. The vgacon driver is probably the most efficient as it only moves the base memory register around without copying anything at all. And that part doesn't have to change. > The primary users would be: > * people who want symbols uncorrupted (especially if their language uses a > non-latin script) > * CJK people (as discussed below) > > It could also simplify the life for distros -- less required configuration: > a single font needed for currently supported charsets together has mere > ~1000 glyphs, at 8x16 that's 16000 bytes (+ mapping). Obviously for CJK > that's more. > > > > So I'm only mentioning possible changes; they could possibly go after > > > your patchset goes in: > > > > > > A) if memory is considered to be at premium, what about storing only one > > > 32-bit value, masked 21 bits char 11 bits attr? On non-vgacon, there's > > > no reason to keep the old structures. > > > > Absolutely. As soon as vgacon is officially relegated to second class > > citizen i.e. perform the glyph translation each time it requires > > a refresh instead of dictating how the core console code works then the > > central glyph buffer can go. > > Per the analysis above, on-the-fly translation is so unobtrusive that it > shouldn't be a problem. > > > > B) if being this frugal wrt memory is ridiculous today, what about instead > > > going for 32 bits char (wasteful) 32 bits attr? This would be much nicer > > > 15 bit fg color + 15 bit bg color + underline + CJK or something. > > > You already triple memory use; variant A) above would reduce that to 2x, > > > variant B) to 4x. > > > > You certainly won't find any objections from me. > > Right, let's see if your patchset gets okayed before building atop it. May I add your ACK to it? Nicolas --8323328-1898205314-1529549949=:16670--