From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 22493 invoked from network); 17 Jan 2022 15:36:11 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 17 Jan 2022 15:36:11 -0000 Received: from mail-lf1-f47.google.com ([209.85.167.47]) by 4ess; Mon Jan 17 10:28:13 -0500 2022 Received: by mail-lf1-f47.google.com with SMTP id p27so47270520lfa.1 for <9front@9front.org>; Mon, 17 Jan 2022 07:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=i758kSy3kZFjZwYsU+Nm0zJjr7qwWve4oQhFC7l+nRA=; b=nxRF59bUUUuemPdddGmtpv83viJWuiVVygJHrNx5HzlgZtn1rwXP9kem7PRhsOhGXv QMj4IU9LpXxv4JjIReF0dSzT+QG3e7oRNEaFsD1UONVoMstIILJKowsekXAm17O6B6bi uGO++t3+3ar+ZyIJ0GMSquhnSYVhqARcfp4dXL7+SksO3GY/tJVAHrW61ysopjOmN+17 PzXwTlWKaq7uuKGtO+cj0yjSpmnv0ySht/8boKl54GVOXp8OD1S4Ruj5a3QFa28/9VQJ F6FIB1t+1UIxHkNMsSa+hpAL3iySzz9QAEjwW1Lug7MAtyr7iVdO3jkYcT32x8pg9pq0 mngA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=i758kSy3kZFjZwYsU+Nm0zJjr7qwWve4oQhFC7l+nRA=; b=tYUlSKNfpoFLDpqEkbCZ9Sp0cEq2Z73+O/tGIcMPdLAaKypp5+Z7JNZhQeskLoSbYG 9SHwu+iY8J4++cVFzN+yytGwcnGsRc2rGIVELbB18HtVccJ6CV9zwgVIBmU7FnayEXig LVYIL+TMoXWzzWEp32nPLcWYw0r96urVcEdF11SDzPDy4nIYrEIGyUfvzo1+u8wSFF3R urFVjO+pSLZgTekZyf/vQz11CgVlxXGQsIU4hjsEATsz+ctmxQz94YpBYC8YI2i9tj4d +WoTWYYvcr4gMlHxBjLNDt5grfg/lFVO7I+WBv4uS11HrW12dd/GDj9LBXWeV+azmP36 X1dQ== X-Gm-Message-State: AOAM531AJCTMRgg8JJMJcSkoAdLH6U0UxCNpypmweezLvlQhH2ESB4W6 nyKc+INMoiONSHa2hy5xDHiQzoTmbIDMgbzYS/Be3Gbw X-Google-Smtp-Source: ABdhPJwe1CpM2k99+aeczAkqFj2Emoutuu5hXXvP48WPI2Oz00trFWbL90ZACqOCxHVcMv1ZoIK+OWYnV7jaBMaIjuQ= X-Received: by 2002:a2e:154a:: with SMTP id 10mr17171074ljv.264.1642433283130; Mon, 17 Jan 2022 07:28:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Martijn Heil Date: Mon, 17 Jan 2022 16:27:51 +0100 Message-ID: To: 9front@9front.org Content-Type: text/plain; charset="UTF-8" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: property AJAX over SSL session factory Subject: [9front] Re: devfs performance Reply-To: 9front@9front.org Precedence: bulk In the meantime I've started writing an (experimental) patch for devfs, that should at least work for my use if I succeed. I'll gladly share it if I consider it anywhere near worthy, but considering my inexperience with this kernel development I have no expectations. Nonetheless I'll try my best. In case anyone is interested in the technical details; Block-interleaved I/O is handled by interio() at /sys/src/9/port/devfs:1134. This in turn synchronously calls the blocking io() located at /sys/src/9/port/devfs:1031 for each sequential block to read from the inner devices. My idea so far is to have one kproc worker per inner device which will communicate with the interio() function by the use of two Qio queue's: one for sending read/write requests to the worker and the other for sending results back from the worker to interio(). The workers will then call io() as requested, which of course, will block the worker. I'm debating whether I should have those live for the duration of the life of the fsdev device, or whether I should spin them up on-demand. I think the best option is to have them live for the duration of the devfs device, so that the overhead of spinning up several kprocs for every little read and write can be avoided, in turn for some slight(?) extra memory usage that the idle kprocs will take up. Again, I have no experience in this and no real expectations either. Maybe I'm trying something really stupid. Please feel free to correct. It's certainly fun and educational. I'm really interested in any other suggestions on how to do this properly. Regards, Martijn Heil aka ninjoh