Received: by 10.223.164.202 with SMTP id h10csp1489771wrb; Mon, 27 Nov 2017 03:34:29 -0800 (PST) X-Google-Smtp-Source: AGs4zMYTUzB95Pmp5gQQ+HLceHx088Q2tB7/SwQvAx+YY4Ad8OGHunYJ3CMEjVpN6QI0TXTowxyp X-Received: by 10.99.160.26 with SMTP id r26mr4803919pge.408.1511782469818; Mon, 27 Nov 2017 03:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511782469; cv=none; d=google.com; s=arc-20160816; b=Bk3GYQBW7ZO3wLLDP+wz5IrxHFey6hAiecNA4PmVSpy3cUpRCLx7tqD3MY/JKlJlJm tHG4N4U/Y3EBIhWxboV/16EEruc7a1zqglgIxL7q4Xga/tupSFtbB18aKUW+zAu0o/HW 9U0EI7AfWSmbQjBHkfKVVmfYRLCwPWi0Q7PGJqZeiC0LoTz6pyfLH1eKwwwmyC9k23T7 +xmx7HX50cSuVLSDiwAamjIFJyj1R/WrVo3VEgUeFmKyJ0cbGYF6/O2hOw1mgNU8kaQt J8Ceiok/9uCFeE6mjX61o19FVvkvoTz/jxHq4kcfN8q7Ea+2pPJI+Ak/7Wr8DKQBz4Hw fb1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=GC6l3nCGghMaSqufjf5Pc8tXwyUw5udzgXw+Mdwrum8=; b=o9t5eSksfrCEcnuT1sm1WmiBPx/b4BYNq5fPOnljtgXGD1yYJlQLEsXie9bUEH18Jm bWzyQtsxOrMpSTTKNZM1p0hjuRhO6XuQMNVswXJo3LmSY8VZ69lpqHtSMjNTPczYWGT1 IbM5lzgLe5TRtl3KY6EJR8mmLME1yl2of3rUDLdlSd10DOjDI9snZrXlMK0rXAWUMVdB QH9C+zwQTE1DkWfSDiCaGINOp9nd5HgzcI8cbC1eEYwlheaRDLowiPtoA3O+ZVI//Fqs wgbtYuEOIwZ39428cWnhFX07Y7k+odL+RYZJwFCgT3gVbfLDqkMIgPPMGKyyTfHQ3Jyo SAog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si23014026pgd.618.2017.11.27.03.34.17; Mon, 27 Nov 2017 03:34:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752067AbdK0LdY (ORCPT + 77 others); Mon, 27 Nov 2017 06:33:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54066 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029AbdK0LdW (ORCPT ); Mon, 27 Nov 2017 06:33:22 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 42AC8C04AC4F; Mon, 27 Nov 2017 11:33:22 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E52D260603; Mon, 27 Nov 2017 11:33:19 +0000 (UTC) Subject: Re: [RFC] a question about stack size form /proc/pid/task/child pid/limits To: Xishi Qiu , LKML , Linux MM Cc: zhong jiang References: <59AF5A20.2000101@huawei.com> From: Florian Weimer Message-ID: <780b9e4e-7405-2266-a589-17a182d7c7da@redhat.com> Date: Mon, 27 Nov 2017 12:33:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <59AF5A20.2000101@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 27 Nov 2017 11:33:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/06/2017 04:14 AM, Xishi Qiu wrote: > Hi, I find if I use a defined stack size to create a child thread, > then the max stack size from /proc/pid/task/child pid/limits still > shows "Max stack size 8388608", it doesn't update to > the user defined size, is it a problem? This reflects the maximum stack size of the main thread after execve. The size of the stack of the current thread is a separate matter; it can be located anywhere in the process image and much smaller or larger than the maximum size of the initial stack of the main thread. Thanks, Florian From 1577758870275188712@xxx Wed Sep 06 03:21:52 +0000 2017 X-GM-THRID: 1577758870275188712 X-Gmail-Labels: Inbox,Category Forums