From owner-freebsd-mips@freebsd.org Sun Nov 13 18:50:21 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE3DCC4049C for ; Sun, 13 Nov 2016 18:50:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83FBA1B5D; Sun, 13 Nov 2016 18:50:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x22f.google.com with SMTP id q124so60811719itd.1; Sun, 13 Nov 2016 10:50:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e5ya5acOb3EPm3HKBAbyqN4bZbz91tdPii5g8Xk0F90=; b=W8Oed199ZFdYdEp/hzMNxhcg0PWUW0ntzF7hLabvX7BM26xBr9aIEdBsU/wo25Ecw7 hoOP7znWybFnqDI4oH0761KGhxO1zDEOn6TcybryaRl5Inyee65At8i/4Y9MEgbICfMc fZV9yK21KAYLub4O4lHeGVA5hXQbXkWR2YIzHrgYuIiqNyinDXYSw2e/j3+JatBHCqtm AOy0Ckaum59RCRF0TAGts3tNqtXQat862NqFeFaYKuAbakbNBn1lZg2EDMog+UxsSk5D MBcIVYhpERiwxRs/P/xLUH+jKHDS4PZ8Xb1cDS1AVhDlZGPWvJKTBRHHDe3ChQuQK01r I4qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e5ya5acOb3EPm3HKBAbyqN4bZbz91tdPii5g8Xk0F90=; b=OkouE27YvnAKga4rNB2SMa1/kQsXwcaM9GHXdzai5++xPc2JUcjS7HSXh0COASoH9s 3+VBnPhAsIuvfiVnJXOs/jWQj5aoWq14nxHETBtGLzb3G5RUAzaltKCR8KvD93Bsvzrx xAHs1bg4bpuHU9vZ2exVCFIuJprh1RHPdfLpCFMh122HFPCDFtFHM4NmB78wjhBnV6zY KmKnAWjM6VfZ7yzlFE0X1931mEc78YvAITK5ndb/OC4YkiwG1s+5kSQY40BqSXYNmz0t MMiQzKsAlcmlWGJcEq1pYQ+L7QsmGGrn/vI7cQNx4Z/7r6EpcdNP9U2l0EjkMlpigeM2 ZlTA== X-Gm-Message-State: ABUngvc+TCp9L/0eaknyhKjs/bhtROWtI7BwC41eR3TI3T2ccg5MAqPzVWxo1rCfIe1yCe6Gbq3JoivdjlZAxQ== X-Received: by 10.107.174.157 with SMTP id n29mr16590484ioo.177.1479063021002; Sun, 13 Nov 2016 10:50:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Sun, 13 Nov 2016 10:50:19 -0800 (PST) In-Reply-To: References: <201610191109.u9JB9TTC002727@repo.freebsd.org> <20161113065851.GD54029@kib.kiev.ua> <20161113071911.GF54029@kib.kiev.ua> <20161113075557.GH54029@kib.kiev.ua> <71C512CD-0FB6-40D8-B46C-30467A245693@bsdimp.com> <20161113161548.GK54029@kib.kiev.ua> From: Adrian Chadd Date: Sun, 13 Nov 2016 10:50:19 -0800 Message-ID: Subject: Re: svn commit: r307626 - head/sys/ufs/ffs To: Konstantin Belousov Cc: Juli Mallett , Warner Losh , Warner Losh , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2016 18:50:21 -0000 Ok, so after talking with others, my questions are: * I thought our VM was supposed to not be doing double mapping like this. warner's comment on irc was: === 13:39 < bsdimp> adrian the VM isn't supposed to do it at all. 13:39 < bsdimp> adrian that is, double map on purpose. 13:40 < bsdimp> though there's some exceptions to the rule 13:40 < bsdimp> since kernel mappings go away in userland, and userland doesn't execute while you're in kernel mode, you can do the flushing game in busdma to prevent most issues. 13:41 < bsdimp> which is what we do. Generally, though, our VM doesn't do it in-kernel. === * is this still the case? or are there places in the VM where we are doing this? * can we introduce a machdep/pmap capability check to see if aliasing is allowed and if so, turn this feature on? Adding a pmap capability and turning it on for say, i386/amd64/arm64 would allow for this new feature as well as the previous behaviour on older platforms. I don't think I have the time to fix mips pmap to support this new feature, so if you want to turn it on for all features, we should really fix/test pmap on said platforms first. Final comment: I'd really like to see a sort of "tested on" for things like this, because it's not clear which platforms/architectures it was tested on. Thanks, -adrian