Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #401064

Re: kqueues and port_create()

From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.lisp, comp.lang.c
Subject Re: kqueues and port_create()
Date 2026-08-12 02:22 -0700
Organization A noiseless patient Spider
Message-ID <87y0ebpua6.fsf@nightsong.com> (permalink)
References (16 earlier) <115do8s$3i42e$2@dont-email.me> <gAOeS.149915$jNNe.30359@fx15.ams4> <8733wkq995.fsf@nightsong.com> <LcTeS.214700$la89.26355@fx06.ams4> <864igzpzsu.fsf@williamsburg.bawden.org>

Cross-posted to 2 groups.

Show all headers | View raw


Alan Bawden <alan@csail.mit.edu> writes:
> I _think_ what Paul was asking was is it possible to get notified when a
> specific file in the file system is opened.

No in linux that's called inotify.  io_uring is basically an alternative
system call interface that's relatively new, and maybe not complete.
You send off a request to do the system call, and get back a queued
response when the call is completed, unlike traditional syscalls that
appear to be synchronous.

One of the calls you can do that way is opening a file.  Historically in
Unix and Linux, there was no way to do that asynchronously.  If you used
open() and the operation was slow (for example NFS, or even anything on
a hard disk), your program would be blocked until the call returned.  If
you don't want to block, you have to do the open() in a separate thread.
GHC and Erlang BEAM have lightweight threads/processes, but they also
had a pool of OS threads to handle operations like opening files.

io_uring lets you open files asynchronously, so you can in principle
simulate an OS in a single user-level process.  More typically though,
io_uring is used as an alternative to something like epoll, for
listening on lots of sockets at the same time.  There are a lot of
benchmarks around that I think say io_uring is a little faster.
io_uring also can replace AIO, which never worked very well.  AIO was
for asynchronous disk i/o operations after the file was already open.

I haven't had occasion to use io_uring yet but I saw its importance when
it first appeared.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-31 07:17 +0800
  Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-07-31 12:21 -0300
    Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-01 01:48 +0800
      Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-05 13:13 -0300
        Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-05 21:48 +0000
          Re: Resources to learn common lisp? David Brown <david.brown@hesbynett.no> - 2026-08-06 09:05 +0200
          Manipulating C code at the AST level, in C (was: Re: Resources to learn common lisp?) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-09 05:33 +0800
            Re: Manipulating C code at the AST level, in C Paul Rubin <no.email@nospam.invalid> - 2026-08-10 01:11 -0700
              Re: Manipulating C code at the AST level, in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-10 13:10 -0700
            Re: Manipulating C code at the AST level, in C Anton Antimo <anton@safunu.org> - 2026-08-10 17:41 -0300
              Re: Manipulating C code at the AST level, in C Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-10 23:53 +0000
                Re: Manipulating C code at the AST level, in C scott@slp53.sl.home (Scott Lurndal) - 2026-08-11 14:29 +0000
                kqueues and port_create() (was: Re: Manipulating C code at the AST level, in C) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 07:51 +0800
                Re: kqueues and port_create() Paul Rubin <no.email@nospam.invalid> - 2026-08-11 20:59 -0700
                Re: kqueues and port_create() Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 13:07 +0800
                Re: kqueues and port_create() Alan Bawden <alan@csail.mit.edu> - 2026-08-12 03:23 -0400
                Re: kqueues and port_create() Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-12 07:50 +0000
                Re: kqueues and port_create() Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-13 11:33 +0800
                Re: kqueues and port_create() Paul Rubin <no.email@nospam.invalid> - 2026-08-12 02:22 -0700
                Re: kqueues and port_create() Alan Bawden <alan@csail.mit.edu> - 2026-08-12 20:55 -0400
                Re: kqueues and port_create() Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-13 11:37 +0800
                Re: kqueues and port_create() "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-12 12:59 -0700
                Re: Manipulating C code at the AST level, in C Nuno Silva <nunojsilva@invalid.invalid> - 2026-08-14 12:26 +0100
              D.N.S. in Common Lisp (was: Re: Manipulating C code at the AST level, in C) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 07:59 +0800
                Re: D.N.S. in Common Lisp Anton Antimo <anton@safunu.org> - 2026-08-12 09:01 -0300
        Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-12 13:18 +0800
          Re: Resources to learn common lisp? bixbox <noreply@example.invalid> - 2026-08-12 10:16 +0200
            Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-13 02:18 +0000
              Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-13 04:56 +0200
                Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-12 21:13 -0700
                Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-13 12:25 -0300
                Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-13 19:01 +0200
                Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-13 14:50 -0700
                Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-14 08:27 -0300
                Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-15 03:18 +0000
                Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-14 02:47 +0000
                Re: Resources to learn common lisp? cross@spitfire.i.gajendra.net (Dan Cross) - 2026-08-14 12:20 +0000
                Re: Resources to learn common lisp? Anton Antimo <anton@safunu.org> - 2026-08-16 15:37 -0300
                Re: Resources to learn common lisp? cross@spitfire.i.gajendra.net (Dan Cross) - 2026-08-14 12:17 +0000
                Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-14 16:31 +0200
              Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-13 11:29 +0800
              Re: Resources to learn common lisp? Michael S <already5chosen@yahoo.com> - 2026-08-14 15:30 +0300
                Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-14 16:45 +0200
                Re: Resources to learn common lisp? David Brown <david.brown@hesbynett.no> - 2026-08-14 17:15 +0200
                Re: Resources to learn common lisp? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-14 19:51 +0200
                Re: Resources to learn common lisp? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-08-14 12:05 -0700
    Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-07-31 22:46 +0000
      Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-01 07:38 +0800
        Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-04 22:26 -0400
      Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-01 09:08 +0000
        Re: Resources to learn common lisp? Paul <nospam@needed.invalid> - 2026-08-01 07:49 -0400
          Re: Resources to learn common lisp? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-01 23:37 +0000
            Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-01 16:54 -0700
          Re: Resources to learn common lisp? tfb <tfb@work.it.out> - 2026-08-02 07:39 +0000
        Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-04 22:39 -0400
    Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-07-31 23:59 -0400
      Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-01 16:12 +0800
        Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-04 22:50 -0400
          Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-05 19:02 +0800
            Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-06 19:36 -0400
              Re: Resources to learn common lisp? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-09 02:11 +0800
                Re: Resources to learn common lisp? steve g <Sgonedes1977@gmail.com> - 2026-08-09 18:49 -0400
                Re: Resources to learn common lisp? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-10 13:08 -0700

csiph-web