From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id EFE8858D8 for ; Mon, 1 Aug 2016 20:08:58 +0200 (CEST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11E28C04D2E6; Mon, 1 Aug 2016 18:08:58 +0000 (UTC) Received: from hmsreliant.think-freely.org (unused [10.10.50.93] (may be forged)) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u71I8t9W028202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 1 Aug 2016 14:08:56 -0400 Date: Mon, 1 Aug 2016 14:08:55 -0400 From: Neil Horman To: "Wiles, Keith" Cc: Neil Horman , Thomas Monjalon , "dev@dpdk.org" , "Mcnamara, John" Message-ID: <20160801180855.GA5220@hmsreliant.think-freely.org> References: <20160720201617.GA23515@hmsreliant.think-freely.org> <9309C1B3-D86C-4265-97A4-58E3D7958944@intel.com> <20160721135433.GA9628@hmsreliant.think-freely.org> <9B6D664A-6C02-4982-BBA1-628C94514164@intel.com> <20160721150604.GC10032@hmsreliant.think-freely.org> <64F83F10-008B-4DB0-9662-989A8F57BE80@intel.com> <20160721183401.GE10032@hmsreliant.think-freely.org> <0D4B04BD-C9E5-43FA-9652-D3636B6766D0@intel.com> <20160801114959.GB11759@hmsreliant.think-freely.org> <749B7847-05FA-4502-AAAA-11C863831E6E@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <749B7847-05FA-4502-AAAA-11C863831E6E@intel.com> User-Agent: Mutt/1.6.2 (2016-07-01) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 01 Aug 2016 18:08:58 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] validate_abi: build faster by augmenting make with job count X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 18:08:59 -0000 On Mon, Aug 01, 2016 at 04:16:12PM +0000, Wiles, Keith wrote: > > >> Neil > >> > > Sorry for the delayed response, I've been on vacation. > > > >> Your modified copy of make has no bearing on the topic we are taking about customers using dpdk in standard distros right? > >> > > !? I really don't know what you're saying here. My only reason for commenting > > on my copy of make was to consider an explination for why make -j 0 might be > > working for me, and not for you. I've since uninstalled and resinalled make on > > my system, and my copy now behaves as yours does > > > > But thats all really irrelevant. I don't know what you mean by this not having > > any bearing on the conversation since we're talking about customers using dpdk > > in a distro. We're not really talking about that at all (if we were using make > > would be a moot point, since distro users tend to only use pre-compiled > > binaries). Were talking about accelerating the build process when comparing > > ABIs on two different dpdk versions, thats all. > > Neil, (I am trying to not read your style of text as condescending and I will try to not do that as well) > > Not everyone uses DPDK from prebuilt libraries and we need to support them as well, correct? > Correct, which is why I didn't understand your initial comment: "Your modified copy of make has no bearing on the topic we are taking about customers using dpdk in standard distros right?" I read that as you saying that the topic we are discussing here is DPDK use in standard distros, to which I am replying "No, that is not what we are talking about here at all" Standard Distros, as I am involved with them, are standard because the end user typically strives to never build software included in the distro themselves. As such, this patch has no bearing whatsoever on those end users, because they expect to just use a pre-built binary that conforms to a given ABI level. They have no need for this code As you note, of course other upstream developers don't use pre-built binaries, and that is who this change is targeting > > > >> Seems odd to me to send this out with 0 or lspci as it may fail because of no lspci and will fail on all Ubuntu systems. > >> > > Again, don't really understand what your saying. If you look at the patch, > > neither of your assertions are true. With this patch and no other change, the > > validate_abi script behaves exactly as it does now. The only thing I've done is > > add a check for the DPDK_MAKE_JOBS environment variable, and if its not set, > > either: > > > > a) Set DPDK_MAKE_JOBS to 1 if lscpu doesn't exist on the system > > b) Set DPDK_MAKE_JOBS to the number of online cpus if lscpu does exist > > > > All of that gets overridden if you manually set DPDK_MAKE_JOBS to something > > else. > > > > seems pretty straightforward to me. > > At this point do we need to add yet another environment variable to get the correct behavior with DPDK. DPDK is very simple to build today and I worry we keep adding special variables to build DPDK. Can we just use a cleaner default, then adding more and more special build requirements? Adding this one is fine, but it also means the customer must read the docs to find this new variable. > Please read back through the thread. The DPDK_MAKE_JOBS environment variable was specifically used because it already exists in the build (see test-build.sh). Thomas specifically asked me to change the environment variable name so that it can be resued. We're not adding anything here that isn't already there in other locations. > DPDK should be build able with the least amount of docs to read, then they can read the docs more later. Just looking at how the developer can get started building DPDK without RTFM problem. At some point they need to read the docs to possibly runs the examples, but to build DPDK should very simple IMO. So, this script has nothing to do with actually building the DPDK, only analyzing differences in ABI between two arbitrary levels. Nothing about this change makes building the DPDK harder, easier, or in any way different. > > > > >> If we ship with 1 then why even bother the adding code and if I have to edit the file or some other method to get better compile performance then why bother as well. > >> > > Please stop and think for a minute. Why would you need to edit a file to change > > anything? If lscpu exists, then everything happens automatically. If it > > doesn't you can still just run: > > export DPDK_MAKE_JOBS=$BIGNUMBER; validate_abi.sh > > Please do not add extra environment variable we would start to get to the point of having so many pre-build requirements it becomes the private knowledge to just build DPDK or a huge setup/RTFM problem. > See above, I'm getting the impression that you're just arguing without actually looking at the code first. > > > > and it works fine. If ubuntu has some other utiilty besides lscpu to parse cpu > > counts, fine, we can add that in as a feature, but I don't see why that should > > stop other, non-ubuntu systems from taking advantage of this. > > > >> Setting the value to some large number does not make any sense to me and if I have to edit file every time or maintain a patch just seems silly. Its no different than setting -j without an argument. -j with no argument, allows make to just fork jobs as deeply as the dependency graph allows (above and beyond the number of cpus that can run them). This can lead to large run queues on the scheduler (depending on the amount of parallelism the dependency graph evaluates to). While thats not necessecarily a bad thing, it may not be what a developer wants (as it shows up as a large load value). Regardless, setting -j to any number larger than the maximum number of independent jobs that a given make file can find is equivalent to setting -j with no argument. Thats all I'm getting at here, export DPDK_MAKE_JOBS= is exactly equivalent to -j without an argument for >= . So you can get the behavior you want, or something more restrictive with my patch. If we just set -j in the validate abi script without an argument, then we only get one of those possibilities. If your argument is that no one would want to set anything other than maximal job count, I would respond by saying that I like to do that frequently, because it lets me limit the load of a build that I run, and it lets me serialize make in the event that I want to debug a build problem. Allowing reduced job counts is a valuable and relevant feature. > >> > > Goodness Keith, stop for just a minute with the editing the file train your on. > > Its an environment variable, you don't have to edit a file to change it. > > Yes Neil, you also need to stop an think about what you are placing on the developer to build DPDK. This one little problem is not the real issue to me, but a symptom of a growing problem in DPDK around how DPDK is build and the amount of knowledge or setup it requires to do this one simple task. > Keith, I feel like you may be missing the point of this script. This is the 3rd time you've asserted that this change makes DPDK harder to build. I assert that: a) The validate_abi script is in no way required to build the DPDK (i.e. it is an ancilliary tool that compares ABI at two different arbitrary points in the project git history. It simply does so by building the DPDK as part of its work) b) The environment variable in question is already being used by other scripts (i.e. there is nothing new being added here in terms of environment variables, only reuse of existing ones) c) Completely ignoring this environment variable in no way impacts behavior (i.e. failure to set this environment variable attempts to accelerate build parallelism within the confines of this script, if the right tools are available, and leaves the behavior unchanged otherwise) Can you please elaborate on how you feel this change makes DPDK harder to build? > > > >> It just seems easier to set it to -j and not use lspci at all. This way we all win as I am not following your logic at all. > >> > > This doesn't even make any sense. If you set it to -j then you get make issuing > > jobs at the max rate make can issue them, which is potentially fine, but may not > > be what developers want in the event they don't want this script to monopolize > > their system. The way its written now lets people get reasonable behavior in > > most cases, and opt-in to the extreeme case should they desire. That makes far > > more sense to me, then just chewing up as much cpu as possible all the time. > > I only suggest -j as this would give the developer the best build performance without having to require lscpu or setting up yet another build environment variable. The lscpu command does not exist on all systems today and other non-Linux based systems in the future. > In your environment it does yes, but that may not be the only thing people want, thats what I'm saying, and I think thats worth taking into account. Also, fwiw, lscpu should be part of every standard linux distribution, as its part of the utils-linux package, which contains a number of core utilities to make user space usable: http://packages.ubuntu.com/precise/amd64/util-linux/filelist I'm not sure if you are asserting that it doesn't exist on your ubuntu system, but that seems to suggest that you've somehow removed it. > The amount of gain with -j over with -j is a reasonable performance option, as for chewing up cpu performance for 20-50 seconds is not a problem IMO. Please look at the bigger picture and not just your way of building DPDK as most will have a standalone machine as a development platform (I would assume) and utilizing that machine to the fullest is not a problem (unless you need to get the last digit of PI in another process :-). > Again, this utility builds the dpdk as part of its work, but is not used for the DPDK build process itself. That seems to be a critical difference in my mind here. > I have DPDK building on Mac OS and lscpu does not exist for that system (I do not know about windows). Think about the future some and using -j just seems to have the least amount of requirements on the system, right? > I'm sorry, no. From what I can see we currently support linux and bsd on a variety of hardware architectures. Thats what we're targeting. I don't think its reasonable to say no to a change because it uses a tool that may not exist on a future operating system, that no one is targeting at the moment, or plans to (Note also, that this script will work just fine on those systems, it will just use the basic behavior of -j 1 because the if [ -e /usr/bin/lscpu ] test will fail, which is more than I can say for the cpu_layout.py script, which will traceback when reading /proc/cpuinfo or dpdk_nic_bind, which will simply fail when trying to bind or unbind a nic using vfio on those systems) I think thats really where were falling apart here. You seem to be under the impression that this script is somehow tied to the build process, and by making this change I am somehow negatively impacting that process (or potentially breaking it). Thats simply not true. This script is self contained, and is in no way part of the build system. The script itself just happens to build the dpdk as part of its work internally), but a developer never has to use it to acutally build the dpdk itself. > If the developer does not like the ‘chew up all of my CPUs' problem then he can read the docs to set the environment variable, but I suspect that would not even happen in 99% of the cases. Ah, so we agree in priciple, and we're just haggling over price? :) I would counter your argument with the fact that 99% of developers also have a system which contains lscpu, and so they will get the right amount of parallelism for their system, not a flood of parallel jobs, nor a serialized single job environment. Its the happy medium I'm after, not too much, not too little. Neil > > Keith >