From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_ZEN_BLOCKED_OPENDNS, URIBL_DBL_BLOCKED_OPENDNS,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.4 Received: from txout-a4-smtp.messagingengine.com (txout-a4-smtp.messagingengine.com [103.168.172.227]) by inbox.vuxu.org (Postfix) with ESMTP id 2EA4A2F2A1 for ; Fri, 9 Jan 2026 06:23:30 +0100 (CET) Received: from localhost.localdomain (phl-topicbox-01.internal [10.202.2.219]) by mailtxout.phl.internal (Postfix) with ESMTP id 7BC1A1C01D2 for ; Fri, 9 Jan 2026 00:23:30 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=skeeve.com; spf=pass smtp.mailfrom=arnold@skeeve.com smtp.helo=freefriends.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=from:message-id:date:to:subject:references :in-reply-to:mime-version:content-type:content-transfer-encoding :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1767936210; bh=HCUYHhvNwCpW0dDu haPDj2y4KPssw5P2DBi6TqwSNDw=; b=T9GzJdTtu7KYHlNzjajwV0hxMCQ0mP4N iVCKIn+Hp6kikJJ312YXItIQcx+6qjL5wjeAJuaEzeV7ACbghMnSmI6v2HqoBNwi seOn1om02+Oh/4L/V3NrkcxKCPsfKP6eVc+v+gqtdfnsqI/JnPDZRPmugEXWnCzP o0XQRUFUUtM= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1767936210; b=n6vdvqacM6kx2eK0gg+Mr+pmiJ8C97h5BUeeeIu9ULvDq1u6Lz YcLMtec2M0NTIRTyYWC/aknGIGnt98tNmPTxcMlTNswUNOYu0cgRmXJ+vqqJEwtx 6FVc3t1FkAkKGJ5Xq3bUHx6y76ee0I7XCSmFPXji1GDsTeuFVptriFnOs= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=skeeve.com; spf=pass smtp.mailfrom=arnold@skeeve.com smtp.helo=freefriends.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: authmilter.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=skeeve.com; iprev=pass smtp.remote-ip=198.99.81.75 (frenzy.freefriends.org); spf=pass smtp.mailfrom=arnold@skeeve.com smtp.helo=freefriends.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=fail smtp.helo=freefriends.org policy.ptr=frenzy.freefriends.org; x-return-mx=pass header.domain=skeeve.com policy.is_org=yes (MX Records found: skeeve.com); x-return-mx=pass smtp.domain=skeeve.com policy.is_org=yes (MX Records found: skeeve.com); x-tls=pass smtp.version=TLSv1.3 smtp.cipher=TLS_AES_256_GCM_SHA384 smtp.bits=256/256; x-vs=clean score=-6 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=from :message-id:date:to:subject:references:in-reply-to:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t=1767936210; x=1768022610; bh=qhL3wtF95eF5cGdqZBFPiysn1hOHN4r1 Us5+7QnRdSk=; b=priLsrFkOyQaVg2XVUZi6WCB7PB8eyDWeC9yi2SjkGURaxpX kl01t7yb0mpRvwGLsH1uE+9bTUlaVNmCJ7noMq9yjjWULlRJgVxvYKGYygvTew+j 6laZugaM5/EMBOGYwVuRkQUcUUj80TwCVPcezEK21VinSXZcmWjWGr+cVmo= Received: from authmilter.topicbox.com (unknown [172.17.0.1]) by mx.topicbox.com (Postfix) with ESMTP id 8449B35CEF6E for <9fans@9fans.net>; Fri, 9 Jan 2026 00:18:37 -0500 (EST) Received: from mx.topicbox.com (172.17.0.1 [172.17.0.1]) by authmilter.topicbox.com (Authentication Milter) with ESMTP id 6DB25A19867; Fri, 9 Jan 2026 00:18:37 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1767935917; b=oA/PQ7vH6iKPUNfucI9wW/p1JaXMhfeToobo1PvweKwQ2tvtLo oQDBzGQ+jyZ07xl8OcZfk2+hH8K32XMDiBQ1RpDf1RHfIaW5CKUs4UbpU11Op8bz k/QodTYG9NnA3RUxkTNcgFJd2ivh1/nAuqYfcGXSwPLoQ+LJCHNuT+Kn348EAzNV gkRkNNWHZ88rxTDw0zVUY2bPWEP5vHOe1uo/lZjVgjLoFxTxJAek/a9Md65eZIlX ak12S3cjX6mBUElZmUcRZBhhfntnaDqN7zFcrxof+h2mQnPCUDffvp0KHz2bbKx7 W0igXxBaA4weJ4evYthEjmUK+MFe4LJC5uhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=from:message-id:date:to:subject:references :in-reply-to:mime-version:content-type :content-transfer-encoding; s=arcseal; t=1767935917; bh=Xfjp+PX+ jE8Qp91K+L1DMT21WNV2+4l6+m4GucG5fNY=; b=P03Ll38IGSHwUpPj/e8M9KJ0 Q5+Gj/bxwKgxbo6tX/r6SEFEjLkYuBPhtD7WdUuavj6+geUW5iWl9TotYRvnAH/j LbCZbI62/4rxmKMC0V2olAkX1Spy1aQXtxMmDDW9/qyTOFkWz83apZOfJjFwft/A EEIDgswRcSGWhldyPIFENqrMnPkBp1y5oSTHl/T/YXYTCT6b7W1dIvRorLXwlgYw J3w1ocYsbxa9PCXtc4KXLSDJ/Drn3s6Sh9b0mLoi4HI3mMf7qAD+uRD0lpKKr/+M Zn0jLB3DoKLgc4PGAZeF6NcAxugbNHpVuUvKGLLAbqP+COMMUwhKegRgkDl3ug== ARC-Authentication-Results: i=1; authmilter.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=skeeve.com; iprev=pass smtp.remote-ip=198.99.81.75 (frenzy.freefriends.org); spf=pass smtp.mailfrom=arnold@skeeve.com smtp.helo=freefriends.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=fail smtp.helo=freefriends.org policy.ptr=frenzy.freefriends.org; x-return-mx=pass header.domain=skeeve.com policy.is_org=yes (MX Records found: skeeve.com); x-return-mx=pass smtp.domain=skeeve.com policy.is_org=yes (MX Records found: skeeve.com); x-tls=pass smtp.version=TLSv1.3 smtp.cipher=TLS_AES_256_GCM_SHA384 smtp.bits=256/256; x-vs=clean score=-6 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdejleehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffuc dlqdeimdenucfjughrpefhkfffvffufhgjfgggtgfgsehtkedttddtreejnecuhfhrohhm pegrrhhnohhlugesshhkvggvvhgvrdgtohhmnecuggftrfgrthhtvghrnhepkeetgeehvd ejjedtvedtgedvffdvtefhieeltdfftdfhjeelteehfeefgfekleehnecuffhomhgrihhn pehllhhnlhdrghhovhdpthhophhitggsohigrdgtohhmnecukfhppeduleekrdelledrke durdejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleek rdelledrkedurdejhedphhgvlhhopehfrhgvvghfrhhivghnughsrdhorhhgpdhmrghilh hfrhhomhepoegrrhhnohhlugesshhkvggvvhgvrdgtohhmqedpnhgspghrtghpthhtohep uddprhgtphhtthhopeeolehfrghnsheslehfrghnshdrnhgvtheq X-ME-VSScore: -6 X-ME-VSCategory: clean Received-SPF: pass (skeeve.com: 198.99.81.75 is authorized to use 'arnold@skeeve.com' in 'mfrom' identity (mechanism 'a' matched)) receiver=authmilter.topicbox.com; identity=mailfrom; envelope-from="arnold@skeeve.com"; helo=freefriends.org; client-ip=198.99.81.75 Received: from freefriends.org (frenzy.freefriends.org [198.99.81.75]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Fri, 9 Jan 2026 00:18:36 -0500 (EST) X-Envelope-From: arnold@skeeve.com X-Envelope-To: <9fans@9fans.net> Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.16.1/8.16.1) with ESMTPS id 6095IZd7057273 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for <9fans@9fans.net>; Thu, 8 Jan 2026 22:18:35 -0700 Received: (from arnold@localhost) by freefriends.org (8.16.1/8.14.7/Submit) id 6095IYu0057272 for 9fans@9fans.net; Thu, 8 Jan 2026 22:18:34 -0700 From: arnold@skeeve.com Message-Id: <202601090518.6095IYu0057272@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Thu, 08 Jan 2026 22:18:34 -0700 To: 9fans@9fans.net Subject: Re: mmaping on plan9? (was Re: [9fans] venti /plan9port mmapped References: <5E011A70-314B-47DB-A5FD-03D6E54F2EFE@iitbombay.org> In-Reply-To: User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: moderate: sender is a member; group holds all messages Topicbox-Message-UUID: a7c18ed6-ed1a-11f0-840a-d48110c0285f Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZThkN2M2ZTQ4YjVjMDc1Yi1NYjRhYmFlMzAyNmE0MmFiNzY4Zjlm?= =?UTF-8?B?NmRiPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mb4abae3026a42ab768f9f6db:1:dqr5I5BL72yhSQrTwdGvul4ziOM1_39cIX-a8fk0rdE I vaguely remember someone being quoted as saying Microkernels don't have to be small. They just have to not do much. :-) ron minnich wrote: > I would not tar the idea of external pagers with the Mach tarbrush. Mach > was pretty much inefficient at everything, including external pagers. > External pagers can work well, when implemented well. > > On Thu, Jan 8, 2026 at 8:41=E2=80=AFPM Paul Lalonde > wrote: > > > Did the same on GPUs/Xeon Phi, including in the texture units. Very > > useful mechanism for abstracting compute with random access characteris= tics. > > > > Paul > > > > On Wed, Jan 7, 2026, 1:35=E2=80=AFp.m. ron minnich = wrote: > > > >> what we had planned for harvey was a good deal simpler: designate a pa= rt > >> of the address space as a "bounce fault to user" space area. > >> > >> When a page fault in that area occurred, info about the fault was sent= to > >> an fd (if it was opened) or a note handler. > >> > >> user could could handle the fault or punt, as it saw fit. The fixup was > >> that user mode had to get the data to satisfy the fault, then tell the > >> kernel what to do. > >> > >> This is much like the 35-years-ago work we did on AIX, called > >> external pagers at the time; or the more recent umap work, > >> https://computing.llnl.gov/projects/umap, used fairly widely in HPC. > >> > >> If you go this route, it's a bit less complex than what you are propos= ing. > >> > >> On Wed, Jan 7, 2026 at 1:09=E2=80=AFPM Bakul Shah via 9fans <9fans@9fa= ns.net> > >> wrote: > >> > >>> > >>> > >>> > On Jan 7, 2026, at 8:41=E2=80=AFAM, ori@eigenstate.org wrote: > >>> > > >>> > Quoth Bakul Shah via 9fans <9fans@9fans.net>: > >>> >> I have this idea that will horrify most of you! > >>> >> > >>> >> 1. Create an mmap device driver. You ask it to a new file handle > >>> which you use to communicate about memory mapping. > >>> >> 2. If you want to mmap some file, you open it and write its file > >>> descriptor along with other parameters (file offset, base addr, size,= mode, > >>> flags) to your mmap file handle. > >>> >> 3. The mmap driver sets up necessary page table entries but doesn't > >>> actually fetch any data before returning from the write. > >>> >> 4. It can asynchronously kick off io requests on your behalf and > >>> fixup page table entries as needed. > >>> >> 5. Page faults in the mmapped area are serviced by making appropri= ate > >>> read/write calls. > >>> >> 6. Flags can be used to indicate read-ahead or write-behind for > >>> typical serial access. > >>> >> 7. Similarly msync, munmap etc. can be implemented. > >>> >> > >>> >> In a sneaky way this avoids the need for adding any mmap specific > >>> syscalls! But the underlying work would be mostly similar in either c= ase. > >>> >> > >>> >> The main benefits of mmap are reduced initial latency , "pay as you > >>> go" cost structure and ease of use. It is certainly more expensive th= an > >>> reading/writing the same amount of data directly from a program. > >>> >> > >>> >> No idea how horrible a hack is needed to implement such a thing or > >>> even if it is possible at all but I had to share this ;-) > >>> > > >>> > To what end? The problems with mmap have little to do with adding a > >>> syscall; > >>> > they're about how you do things like communicating I/O errors. > >>> Especially > >>> > when flushing the cache. > >>> > > >>> > Imagine the following setup -- I've imported 9p.io: > >>> > > >>> > 9fs 9pio > >>> > > >>> > and then I map a file from it: > >>> > > >>> > mapped =3D mmap("/n/9pio/plan9/lib/words", OWRITE); > >>> > > >>> > Now, I want to write something into the file: > >>> > > >>> > *mapped =3D 1234; > >>> > > >>> > The cached version of the page is dirty, so the OS will > >>> > eventually need to flush it back with a 9p Twrite; Let's > >>> > assume that before this happens, the network goes down. > >>> > > >>> > How do you communicate the error with userspace? > >>>=20 > >>> This was just a brainwave but... > >>>=20 > >>> You have a (control) connection with the mmap device to > >>> set up mmap so might as well use it to convey errors! > >>> This device would be strictly local to where a program > >>> runs. > >>>=20 > >>> I'd even consider allowing a separate process to mmap, > >>> by making an address space a first class object. That'd > >>> move more stuff out of the kernel and allow for more > >>> interesting/esoteric uses. > >> *9fans * / 9fans / see discussions > > + participants > > + delivery options > > Permalink > > > > ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Te8d7c6e48b5c075b-Mb4aba= e3026a42ab768f9f6db Delivery options: https://9fans.topicbox.com/groups/9fans/subscription