From owner-svn-src-head@freebsd.org Sat Oct 26 17:49:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D5E917B2D4; Sat, 26 Oct 2019 17:49:52 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 470pQl4jvdz4RMS; Sat, 26 Oct 2019 17:49:51 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qt1-f193.google.com with SMTP id z22so8283864qtq.11; Sat, 26 Oct 2019 10:49:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YYjBQeOqXdwq0ULNQPnsrKlpNITOIU7jPXhFmSLzK1E=; b=U1FqTL6kzaX0D3puGhGDz3+teOcC4+Zn5TQxcCrQxJpGvST3KSgAK4yg1ulIwPfBsF PPmpv9N0iUOoobnSKGmug0jaLHHePz+vHRqvF0nFz/NrAICrZo7d5Em0mF4VaqD/5ZKf EYKZ2KmLdEcQlGv9cbh7kO9XwhGg3yCtddmzvmwtIpYcXwhTfyfuY3CgEXRn846JdWza KmVwlNuYMssTr+uyBcRlxUGIgFhMyFtw6mL8dmNywwXMres3N4fsQeXntJV/hBKu8DGN pL1s0jnjc39bGA0cInUlNG4fvSNf2BurzTQ8U70+Q32W80oU7snqGUJESXUShJMMcS54 QLNw== X-Gm-Message-State: APjAAAVafUkB34I/9MIFbCy6/6iu1hGXSHfserH2aBaRBqW39rldz7Va rsG2PDK8Nk4mra6g5d/yatHTPEsC3dD91FR8f40= X-Google-Smtp-Source: APXvYqyAU3vafLBF+EKhPq7fMNYpMoxd37+HN0wRwghf6P9OoZ743Y6shTPnmfNT0OENkPUurBTOuY2M4vCxpwAswNg= X-Received: by 2002:ac8:1413:: with SMTP id k19mr9700010qtj.360.1572112190050; Sat, 26 Oct 2019 10:49:50 -0700 (PDT) MIME-Version: 1.0 References: <201910252009.x9PK9gIV092660@repo.freebsd.org> <20191026082655.GJ73312@kib.kiev.ua> <20191026130048.GL73312@kib.kiev.ua> In-Reply-To: <20191026130048.GL73312@kib.kiev.ua> From: Antoine Brodin Date: Sat, 26 Oct 2019 19:49:38 +0200 Message-ID: Subject: Re: svn commit: r354095 - in head/sys: amd64/amd64 amd64/include kern To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Gerald Pfeifer Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 470pQl4jvdz4RMS X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of antoinebrodinfreebsd@gmail.com designates 209.85.160.193 as permitted sender) smtp.mailfrom=antoinebrodinfreebsd@gmail.com X-Spamd-Result: default: False [-3.55 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RWL_MAILSPIKE_GOOD(0.00)[193.160.85.209.rep.mailspike.net : 127.0.0.18]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[193.160.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.55)[ip: (-2.42), ipnet: 209.85.128.0/17(-3.22), asn: 15169(-2.05), country: US(-0.05)]; FORGED_SENDER(0.30)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Sat, 26 Oct 2019 17:49:52 -0000 On Sat, Oct 26, 2019 at 3:01 PM Konstantin Belousov wrote: > On Sat, Oct 26, 2019 at 02:16:19PM +0200, Antoine Brodin wrote: > > On Sat, Oct 26, 2019 at 10:27 AM Konstantin Belousov > > wrote: > > > On Sat, Oct 26, 2019 at 08:24:09AM +0200, Antoine Brodin wrote: > > > > On Fri, Oct 25, 2019 at 10:09 PM Konstantin Belousov wrote: > > > > > > > > > > Author: kib > > > > > Date: Fri Oct 25 20:09:42 2019 > > > > > New Revision: 354095 > > > > > URL: https://svnweb.freebsd.org/changeset/base/354095 > > > > > > > > > > Log: > > > > > amd64: move pcb out of kstack to struct thread. > > > > > > > > > > This saves 320 bytes of the precious stack space. > > > > > > > > > > The only negative aspect of the change I can think of is that the > > > > > struct thread increased by 320 bytes obviously, and that 320 bytes are > > > > > not swapped out anymore. I believe the freed stack space is much more > > > > > important than that. Also, current struct thread size is 1392 bytes > > > > > on amd64, so UMA will allocate two thread structures per (4KB) slab, > > > > > which leaves a space for pcb without increasing zone memory use. > > > > > > > > > > Reviewed by: alc, markj > > > > > Tested by: pho > > > > > Sponsored by: The FreeBSD Foundation > > > > > MFC after: 2 weeks > > > > > Differential revision: https://reviews.freebsd.org/D22138 > > > > > > > > Hi, > > > > > > > > It seems that this breaks at least some versions of gcc: > > > > > > > > In file included from /usr/include/sys/proc.h:75, > > > > from /usr/include/sys/user.h:51, > > > > from ./md-unwind-support.h:34, > > > > from > > > > /wrkdirs/usr/ports/lang/gcc10-devel/work/gcc-10-20191020/libgcc/unwind-dw2.c:412: > > > > /usr/include/machine/proc.h:76:13: error: field 'md_pcb' has incomplete type > > > > 76 | struct pcb md_pcb; > > > > | ^~~~~~ > > > > > > > > > > It is very strange. Are gcc 9 or 8 affected ? > > > > gcc 8 and 9 are affected too. > Then this is a completely different cause then I guessed below, and I think > I know why. All of 8/9/10 gcc ports have support for multiarch, and the > error must happen for gcc or xgcc invocation with -m32, am I right ? > > If yes, please try the patch at the end of the message instead. > > diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h > index 44e34fa5c83..8800b355c9a 100644 > --- a/sys/amd64/include/pcb.h > +++ b/sys/amd64/include/pcb.h > @@ -116,6 +116,10 @@ struct susppcb { > /* fpu context for suspend/resume */ > void *sp_fpususpend; > }; > +#else /* 32bit */ > +struct pcb { > + uint64_t pcb_dummy[40]; > +}; > #endif > > #ifdef _KERNEL Hi, It builds fine with this patch. Antoine