From owner-svn-src-head@freebsd.org Fri May 4 23:39:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A02EFBBA56; Fri, 4 May 2018 23:39:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D6DC6E1CF; Fri, 4 May 2018 23:39:57 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w44Ndr38044527; Fri, 4 May 2018 16:39:53 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w44Ndr2E044526; Fri, 4 May 2018 16:39:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201805042339.w44Ndr2E044526@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r333266 - head/sys/amd64/amd64 In-Reply-To: To: Mateusz Guzik Date: Fri, 4 May 2018 16:39:53 -0700 (PDT) CC: Steven Hartland , Mateusz Guzik , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2018 23:39:58 -0000 [ Charset UTF-8 unsupported, converting... ] > On Sat, May 5, 2018 at 12:58 AM, Steven Hartland < > steven.hartland@multiplay.co.uk> wrote: > > > Can we get the why in commit messages please? > > > > This sort of message doesnt provide anything more that can be obtained > > from reading the diff, which just leaves us wondering why? > > > > I?m sure there is a good reason, but without confirmation we?re just left > > guessing. The knock on to this is if some assumption that caused the why > > changes, anyone looking at this will not be able to make an informed > > descision that that was the case. > > > > > bcopy is an equivalent of memmove, i.e. it accepts overlapping buffers. > But if we know for a fact they don't overlap (like here), doing this over > memcpy (which does not accept such buffers) only puts avoidable > constraints on the optimizer. > > This is a rather pedestrian change which can be made in many places, > I don't see the point of repeating the explanation in each one. Although > I guess it would make sense to point at a specific commit which explains > things. Though this makes sense at the present time when one is reading commits one after the other, in 2 years time when I am looking at just the log file of just one of the effected files that context is lost, so please document things in a way that the information in the log is usefull, part of the purpose of the log is to help us locate and to understand why something was done to the code. It is really rather painful to be reading logs and have to do 30 svn diffs rXXXXX to see what the log entry is trying to explain, and in this case even that does not tell why it was done. > > > On Fri, 4 May 2018 at 23:41, Mateusz Guzik wrote: > > > >> Author: mjg > >> Date: Fri May 4 22:41:12 2018 > >> New Revision: 333266 > >> URL: https://svnweb.freebsd.org/changeset/base/333266 > >> > >> Log: > >> amd64: syscall path bcopy -> memcpy > >> > >> Modified: > >> head/sys/amd64/amd64/trap.c > >> > >> Modified: head/sys/amd64/amd64/trap.c > >> ============================================================ > >> ================== > >> --- head/sys/amd64/amd64/trap.c Fri May 4 22:33:54 2018 (r333265) > >> +++ head/sys/amd64/amd64/trap.c Fri May 4 22:41:12 2018 (r333266) > >> @@ -908,7 +908,7 @@ cpu_fetch_syscall_args(struct thread *td) > >> error = 0; > >> argp = &frame->tf_rdi; > >> argp += reg; > >> - bcopy(argp, sa->args, sizeof(sa->args[0]) * 6); > >> + memcpy(sa->args, argp, sizeof(sa->args[0]) * 6); > >> if (sa->narg > regcnt) { > >> KASSERT(params != NULL, ("copyin args with no params!")); > >> error = copyin(params, &sa->args[regcnt], > >> > >> > > > -- > Mateusz Guzik -- Rod Grimes rgrimes@freebsd.org