From owner-svn-src-all@freebsd.org Sat Oct 26 06:24:22 2019 Return-Path: Delivered-To: svn-src-all@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 3FF5B160260; Sat, 26 Oct 2019 06:24:22 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (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 470WCp0Pwcz3Jy0; Sat, 26 Oct 2019 06:24:21 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qt1-f195.google.com with SMTP id u22so6682446qtq.13; Fri, 25 Oct 2019 23:24:21 -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=ahW9qVMNt/ZHgXI3B4iGEn55aASqNM3T9o0h0jcuAsU=; b=F3cXKaA2K5U+wZj9uRpNoNaL/OuCYJUKWf4CeZejpoALKbLc3wprH+3NOjsXwwJNPa 1/ll1EOkSF2GGcM3rPheKN5u8bH388WWs44S6e3rvf4CWFhgagVBns/Egz9LsN1sRZIu sVuhdK/mE5M8Rww5Etdp+h8L/z+/YsJ9EUOUDG4OLbN2W40BRbqrkmdoT5dVccevhdLR w2MfA3iRhnGHFlafnG16u4rR1+Odk5WUZLUggOvKJeMzBGOOApu4o4QzOaiZ2ttpg+L5 8vd2hMBMo1NOPWaQhylRkxoZ2S+G6ZnPyLTBI2C8E3bHBuTvkIcRgxvz+wqs040G/uOm SkSA== X-Gm-Message-State: APjAAAVciTEVrpWYD1uhAwJQTPA0lpDxWquab16xtgmx5q3I1Y047KVV cYupp1JTSnoX/I3Bx2eBgg9j+TZSPSxc0InvtsyPYDV7 X-Google-Smtp-Source: APXvYqzNzjLJZ5xtLiLxoF8Y7q8hkYxk9vzdxG5Pk/ytN1reAdOQOjQtIf3mR/nNKo68PkMLvp5wZXP4JslIUFuza3E= X-Received: by 2002:ad4:44b3:: with SMTP id n19mr1344349qvt.133.1572071060329; Fri, 25 Oct 2019 23:24:20 -0700 (PDT) MIME-Version: 1.0 References: <201910252009.x9PK9gIV092660@repo.freebsd.org> In-Reply-To: <201910252009.x9PK9gIV092660@repo.freebsd.org> From: Antoine Brodin Date: Sat, 26 Oct 2019 08:24:09 +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: 470WCp0Pwcz3Jy0 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2019 06:24:22 -0000 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; | ^~~~~~ Antoine