Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751004AbdIKSOz (ORCPT ); Mon, 11 Sep 2017 14:14:55 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:55798 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbdIKSOy (ORCPT ); Mon, 11 Sep 2017 14:14:54 -0400 Date: Mon, 11 Sep 2017 19:14:38 +0100 From: Alan Cox To: Rob Landley Cc: Geert Uytterhoeven , Linux Embedded , Oleg Nesterov , dalias@libc.org, "linux-kernel@vger.kernel.org" Subject: Re: execve(NULL, argv, envp) for nommu? Message-ID: <20170911191438.3221e95e@alans-desktop> In-Reply-To: References: <324c00d9-06a6-1fc5-83fe-5bd36d874501@landley.net> <20170905142436.262ed118@alans-desktop> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 20 > It's not the performance cost, it's rewriting all the pointers. Which you don't need to do > Without address translation, copying the existing mappings to a new > range requires finding and adjusting every pointer to the old data, No it doesn't. See Minix. When you fork() rather than vfork you stick a copy of any non-relocatable elements (typically DATA copy + BSS + stack with a sane CPU and compiler) into a buffer and you swap them over with the real copy when you task switch to the one in the wrong place. If you start the child first you usually only take one copy. I've always been amused that Linux NOMMU hasn't managed to grow a feature that people successfully implemented on 68000 long long ago, and I believe some other processors back to v6/v7 days. Alan