From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kate-mail.whsl206.com ([49.50.249.113]) by ewsd; Tue Mar 10 22:23:39 EDT 2020 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qs.co.nz; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DeS0F1ikTRSN+I7JnPxKgziTSnwTEVqsCUDQ0Fd6XuE=; b=ZUxkfRSGO7GlX6h9vpe3/Up38a Ye9kohfeJ799nu7FIMxmkW9qZr17Zi/48KR42nQ/wQi7YZ5y00ll8JGWjJ1QgWAmEuePfgoOHHuOM ImFg6CpcPwgEK4NN6f+DsG9WsCdvG4s4etOEFzevi5hBsiB0bx/GB+SV4iXJxYDWuNJVnzbF8xjWm jq8+p/JVoBb2itV/P8ke0RVhSq0ezdo0oUo1OySeDnWheHqkNbYN1IOlM+cGQZzgwKEj+3fNd27PD wQgOHsAPB2AipOcMhvm+p+mtfku61cVJ2lt3HAFyPgs4IRNxFRSVwVrjkt/Dg+W+7LAvnjdBaJo+l 6TRs7M6g==; Received: from [118.149.168.211] (port=4820 helo=[192.168.43.110]) by kate.whsl206.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jBr1B-000wIZ-LC for 9front@9front.org; Wed, 11 Mar 2020 15:22:46 +1300 Subject: Re: [9front] How is smp handled in file services? To: 9front@9front.org References: <9FAB3D9B768738E59305FAA3FBD02A19@eigenstate.org> From: Trevor Higgins Message-ID: Date: Wed, 11 Mar 2020 15:22:44 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <9FAB3D9B768738E59305FAA3FBD02A19@eigenstate.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - kate.whsl206.com X-AntiAbuse: Original Domain - 9front.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - qs.co.nz X-Get-Message-Sender-Via: kate.whsl206.com: authenticated_id: phil@qs.co.nz X-Authenticated-Sender: kate.whsl206.com: phil@qs.co.nz X-Source: X-Source-Args: X-Source-Dir: List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: content-driven SVG cache table On 03/11/2020 02:03 PM, ori@eigenstate.org wrote: I dont mean to offend , but that seems more than a bit sucky. Listening to Rob Pike wax lyrically about the benefits of CSP over parallel , seems to ring a bit hollow in the face of all the evidence to the contrary. (I must admit his metaphor of 'book burning' to explain CSP now looks quite prescient given the current climate of intolerance to free speech). So 15 of my 16 mk tasks come to a shit shattering halt when ever I/O needs to be done. This explains to me why ramfs does not provide much of a speed increase when building. This probably will translate very badly for performance when file systems are stacked on top of each other. Rather than achieving high concurrency , it will degenerate into a linear flow through the stack and back. Probably also explains why 9p over the interweb is so slow. What I don't see in the 'Plan' is how to introduce a pipeline into the Fileserver processing to take advantage of SMP. Even if you break each I/O request into 10 steps, there is no way to separate this out into 10 programs all working concurrently. So as you say each file service has to make it's own determination on how many tasks to run concurrently, which is also sub-optimal. The design of P9 is to have FS in userspace and not kernel so optimizations there are not going to help. >> Just trying ti understand the data flow through the kernel (as compared >> to *nix). >> >> Given the following easy to understand example: >> >> Assume that three processes are writing to /dev/audio through the mixfs >> file server. Given that all processes are on the same terminal server, >> and that there are ample idle cpu cores (ignore locking and other side >> effects), what is the data flow path in mixfs: >> >> 1. All three procs sleep while some proc processes the write >> requests sequentially, returning the results sequentially. >> >> 2. All three procs enter the file service and process one request >> concurrently and return result directly to own process. >> >> I am assuming that unless designed specifically in the file server, that >> the answer is 1. > If you're in userspace, the file server is just reading from > an FD. it's up to you if you want to add concurrency around > those reads. > > If you're in the kernel, it's concurrent. a process enters > the kernel from sysfile.c:/^sysread, which pretty much just > calls sysfile.c:/^read. > > There aren't any locks held up to: > > nnn = nn = devtab[c->type]->read(c, p, n, off); > > Smokey the bear says: Only you can prevent corrupted data > structures. > -- We need another plan