linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <koct9i@gmail.com>
To: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Hugh Dickins <hughd@google.com>,
	Yury Gribov <y.gribov@samsung.com>,
	Alexandr Andreev <aandreev@parallels.com>,
	Vassili Karpov <av1474@comtv.ru>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH RFC] drivers/char/mem: byte generating devices and poisoned mappings
Date: Tue, 1 Apr 2014 21:27:47 +0400	[thread overview]
Message-ID: <CALYGNiONACddsH_6uaG5QyaWRaZ_5ZH0atZJyZVD=DowiKLJcw@mail.gmail.com> (raw)
In-Reply-To: <20140401175947.5b5a3298@alan.etchedpixels.co.uk>

On Tue, Apr 1, 2014 at 8:59 PM, One Thousand Gnomes
<gnomes@lxorguk.ukuu.org.uk> wrote:
> On Tue, 01 Apr 2014 01:16:07 +0400
> Konstantin Khlebnikov <koct9i@gmail.com> wrote:
>
>> This patch adds 256 virtual character devices: /dev/byte0, ..., /dev/byte255.
>> Each works like /dev/zero but generates memory filled with particular byte.
>
> More kernel code for an ultra-obscure corner case that can be done in
> user space
>
> I don't see the point

True. That was a long-planned joke.
But at the final moment I've found practical usage for it and overall
design became not such funny.

Currently I'm thinking about single-device model proposed by Kirill.

Let's call it /dev/poison. Application can open it, write a poison (up
to a page size) and after that this instance will generate pages
filled with this pattern. I don't see how this can be done in
userspace without major memory/cpu overhead caused by initial memset.

Default poison might be for example 0xff, so it still will be useful for 'dd'.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2014-04-01 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 21:16 Konstantin Khlebnikov
2014-04-01 10:36 ` Kirill A. Shutemov
2014-04-01 15:15   ` Konstantin Khlebnikov
2014-04-01 16:07     ` Kirill A. Shutemov
2014-04-01 16:59 ` One Thousand Gnomes
2014-04-01 17:27   ` Konstantin Khlebnikov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALYGNiONACddsH_6uaG5QyaWRaZ_5ZH0atZJyZVD=DowiKLJcw@mail.gmail.com' \
    --to=koct9i@gmail.com \
    --cc=aandreev@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=av1474@comtv.ru \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=y.gribov@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox