From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 3 09:20:57 2011 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 E1760106566C for ; Sat, 3 Dec 2011 09:20:57 +0000 (UTC) (envelope-from filippo.sironi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA128FC08 for ; Sat, 3 Dec 2011 09:20:56 +0000 (UTC) Received: by bkat2 with SMTP id t2so5602820bka.13 for ; Sat, 03 Dec 2011 01:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=1J3Q61eyt2JBJVYwbL/gGqykcexQokpK9I38yB2cYX4=; b=cqVgAAcJ7N0Hpk4jBD18pYO6EcyjhgkV2CeddQYveMBHRazXIn1LzJ5V0yniedxwDq xhFrLLUT4sQiRleLBq7a4ShHEFQCRZsDpj/Z4rXjkJb3eCDqgwPuj6iSE7qCHNUYLTtF 1DuyS4pPJdxujesQxs1wuES5tb5lhXadAhprc= Received: by 10.204.141.2 with SMTP id k2mr773433bku.81.1322904056132; Sat, 03 Dec 2011 01:20:56 -0800 (PST) Received: from filippo.sironi.dynamic.micro.elet.polimi.it (micro.elet.polimi.it. [131.175.127.118]) by mx.google.com with ESMTPS id q6sm20828586bka.6.2011.12.03.01.20.54 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Dec 2011 01:20:55 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Filippo Sironi In-Reply-To: <10964.1322903784@critter.freebsd.dk> Date: Sat, 3 Dec 2011 10:19:43 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <10964.1322903784@critter.freebsd.dk> To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.1084) Cc: Sironi Filippo , Poul-Henning Kamp Subject: Re: mmap implementation for cdev 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: Sat, 03 Dec 2011 09:20:58 -0000 Ok, that's what I was suspecting. Do you have any ideas on how to get the behavior I described in the = previous mail? On 03/dic/2011, at 10.16, Poul-Henning Kamp wrote: > In message , Filippo = Sironi wri > tes: >=20 >> The problem is that when I come =3D >> back to user space all the threads write in memory page mapped by the = =3D >> first thread that called the mmap leaving their memory pages = untouched. >=20 > That's how cdev->mmap works, it is global rather than per-thread. >=20 >=20 > --=20 > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe =20 > Never attribute to malice what can adequately be explained by = incompetence.