From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A235CC433DF for ; Tue, 20 Oct 2020 08:45:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FD5222282 for ; Tue, 20 Oct 2020 08:45:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gxTMHx0S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392108AbgJTIpC (ORCPT ); Tue, 20 Oct 2020 04:45:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389334AbgJTIpC (ORCPT ); Tue, 20 Oct 2020 04:45:02 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 153ECC061755 for ; Tue, 20 Oct 2020 01:45:02 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id d23so660979pll.7 for ; Tue, 20 Oct 2020 01:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version; bh=p2KAi1Y8jAIxsXHWL71zfWkhlbCdaKgX0rSnrVgk4Bk=; b=gxTMHx0SGLxChVPaiF1NqDP6Xnpd933JqK8bmHZDJp1IemUqcEwjmJlEJZLLOtTA52 3TTO9HfE47svlppLDWDEG7Sx3hv5oDAOMsPtmZ/Prua7fbul+zMp7N2DVdA58NL1dxdU qBLWlCc1gx/uvY9pTCgHeDHh+kdhOIKgdg17b1vlSL1lfgMRfIx4RWUSctZSwAJyVACm DSTR18T39b3DZh2JnBIoOl31D4kc0CK+cURBKYAXDhvrBMHu2gGwBNjPi1uCOPjHNKEu SuS2qej0goUCEG5HANnywmw6U8A03BXsoqfuysr8eZrZLMsX4EDw3HHpgPxRYi1tVwbC HbVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to :references:user-agent:mime-version; bh=p2KAi1Y8jAIxsXHWL71zfWkhlbCdaKgX0rSnrVgk4Bk=; b=jAaIof2soBQcX3IBWcVtXEcW2F8nBQ7Q+9yOqhBzbbPpZq/aGYTVtpSEVja8cAT9FH 7Jzjcb97J2HpEUV61l/G7zRIkmu3EvAs5V8i6J1n50uSHeBZR6eywsquEBxMaYWxH5VT BIwEqEeQBK/Ts+yssAr520mU2lVd5Z/aid+W+IetxWP4Qg0E3pTClVuU7QTq1KudPu6h XG/u5qKAUKXWlaxfhqUO7BTx6Y7MNtzPQVrXn7hUigtIiw5TvG84wOLihuoe8nWgDXqj kghr46LekL7Vfj3SAIXCWRMy8saYRnM/geN342ScM9BdZYOTNm5mk7vJ28zIcddIq0GG Vnhg== X-Gm-Message-State: AOAM530JyAA2TIyH9wVZ5I3do+htlukDd59qs7/5uaI1L1+U26N/tM2n IR7UIkunt0d4o3sgwLcwwjdlF9M1J48n1A== X-Google-Smtp-Source: ABdhPJx3GFwrsZg/0FhFFfBwNDUjIZuw1LyJYZt/GvhlZMAkzjxFx1qeRyHWzqGpHPIwXLuCzSWfBg== X-Received: by 2002:a17:90b:1646:: with SMTP id il6mr1816258pjb.235.1603183501448; Tue, 20 Oct 2020 01:45:01 -0700 (PDT) Received: from earth-mac.local.gmail.com (219x123x138x129.ap219.ftth.ucom.ne.jp. [219.123.138.129]) by smtp.gmail.com with ESMTPSA id y16sm498902pgh.8.2020.10.20.01.44.57 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Oct 2020 01:45:00 -0700 (PDT) Date: Tue, 20 Oct 2020 17:44:55 +0900 Message-ID: From: Hajime Tazaki To: johannes@sipsolutions.net Cc: linux-arch@vger.kernel.org, tavi.purdila@gmail.com, richard@nod.at, jdike@addtoit.com, linux-um@lists.infradead.org, retrage01@gmail.com, linux-kernel-library@freelists.org, anton.ivanov@cambridgegreys.com Subject: Re: [RFC v7 08/21] um: add nommu mode for UML library mode In-Reply-To: <945d17982b92801dc4a8d61d9fed91e0e60b0105.camel@sipsolutions.net> References: <945d17982b92801dc4a8d61d9fed91e0e60b0105.camel@sipsolutions.net> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/25.3 Mule/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org Hello, sorry for the late response. On Sat, 10 Oct 2020 01:06:03 +0900, Johannes Berg wrote: > > On Fri, 2020-10-09 at 12:38 +0900, Hajime Tazaki wrote: > > > > > > +++ b/arch/um/nommu/Makefile.um > > > > > > [...] > > > > > > > +ifeq ($(shell uname -s), Linux) > > > > +NPROC=$(shell nproc) > > > > +else # e.g., FreeBSD > > > > +NPROC=$(shell sysctl -n hw.ncpu) > > > > +endif > > > > > > That seems very inappropriate here. > > > > Will cut the FreeBSD part. > > But even the NPROC and -j flag mangling seems ... awful? Okay, we won't use the -j flag at this place. > > > > --- /dev/null > > > > +++ b/arch/um/nommu/include/asm/atomic64.h > > > > > > That doesn't make sense to me, you can control CONFIG_GENERIC_ATOMIC64 > > > to be on, and don't need the ifdef and this file? > > > > We were suggested to not use GENERIC_ATOMIC64 on 64bit build during > > our v3 patchset. So we actually control CONFIG_GENERIC_ATOMIC64 to be > > on only when !64BIT, and thus need atomic64.h for the 64BIT build. > > > > https://lwn.net/ml/linux-arch/20200205093454.GG14879@hirez.programming.kicks-ass.net/ > > Well, yeah, but your architecture _is_ a piece of crap in needing > atomic64 emulation? :-) > > How about just using the real atomic64 implementation like UML normally > does? I mean, falling back to the actual underlying CPU. Or even gcc > intrinsics? > > You've basically re-implemented CONFIG_GENERIC_ATOMIC64, so perhaps > you've hidden it from PeterZ's view now because you're no longer > touching the real generic atomic64 (which is for 32-bit machines), but > that doesn't actually make this any *better*. Arguably *worse* since > you've just copied it ... We're trying to reimplement atomic64 ops with gcc builtins. We're now trying to address all of comments we got, and will get here back once we have done. -- Hajime