From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 13 20:37:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA5411065679; Tue, 13 Apr 2010 20:37:58 +0000 (UTC) (envelope-from jaxbrigs@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 297748FC2B; Tue, 13 Apr 2010 20:37:57 +0000 (UTC) Received: by bwz8 with SMTP id 8so4713852bwz.3 for ; Tue, 13 Apr 2010 13:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:cc:subject :date:mime-version:content-type:content-transfer-encoding:x-priority :x-msmail-priority:x-mailer:x-mimeole; bh=ajuR1t7Af6akXlaDNQpYwrlFzMXrekCswnvEgOiEV3E=; b=pojmrXi56ng+odRCgWz4Q9rDKTTGUtlsuW/4c0DylEYtytj0JZud88PvVVIuoIdsab bs5lHd8PAtymd+Mdck6btFGDDqf/fmGFv8N5CKySQTYxUJOldeQiJ0sXDEWnlp/u//TI AVzLFbwa7u0nEc565003iAmIDDJYn1a3nLqg8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:cc:subject:date:mime-version:content-type :content-transfer-encoding:x-priority:x-msmail-priority:x-mailer :x-mimeole; b=uHsOXBnFKI91Uo3XEQNpsJAuLwBt5YU00bxco7MjEPNOZiPjy+roUaKtuxWk3NbfKU pFt6Vjvgxw9hvRT3uaKygw+JrBRL/whkBKmgqpGAZmIPBjMNRl74Q8x7G6WZrxgfvDs+ PrvBplZDmY4fmVQ0YVrNM/OP/gRY9yxTjksVs= Received: by 10.223.7.78 with SMTP id c14mr3641071fac.64.1271189624524; Tue, 13 Apr 2010 13:13:44 -0700 (PDT) Received: from JAX (PPPoE-78-29-107-29.san.ru [78.29.107.29]) by mx.google.com with ESMTPS id 28sm11897357fkx.6.2010.04.13.13.13.43 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Apr 2010 13:13:43 -0700 (PDT) Message-ID: <5ED60A4D35014945A5F9C14F253E1D52@lan.jax.org.ru> From: "Igor Druzhinin" To: Date: Wed, 14 Apr 2010 00:13:39 +0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Mailman-Approved-At: Tue, 13 Apr 2010 20:57:36 +0000 Cc: freebsd-hackers@freebsd.org Subject: GSoC 2010 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:37:58 -0000 Hello, Robert Watson I have considered your remarks to my proposal. Now I have some problems with GSoC site so I've decided to post my comment here. About choosing the best method for current hardware: I think that the best way to realise it is to use small userspace shared memory region where kernel can to load additional syscall stub during initialization. It may looks like this: write() stub: ... sub $0x0C, %esp movl $_fd, (%esp) movl $_buf, 0x4(%esp) movl $_len, 0x8(%esp) movl $4, %eax call add $0x0C, %esp ... Depending on output of CPUID command during the initialization kernel will load certain shared stub. For newer processors it may be: shared stub: sysenter ret About my testing plans: I think it will be simple multi-threaded program that will call syscalls in the loop and measure them execution time with time-stamp counter (RDTSC). If all is fulfilled correctly regression should not to arise.