From owner-freebsd-current@freebsd.org Fri Aug 31 05:28:22 2018 Return-Path: Delivered-To: freebsd-current@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 83C78F73FFB for ; Fri, 31 Aug 2018 05:28:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F33F6828D8; Fri, 31 Aug 2018 05:28:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w7V5S5d9000684 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 31 Aug 2018 08:28:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w7V5S5d9000684 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w7V5S5bA000683; Fri, 31 Aug 2018 08:28:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 31 Aug 2018 08:28:05 +0300 From: Konstantin Belousov To: Michael Butler Cc: John Baldwin , Ian FREISLICH , freebsd-current Subject: Re: intr_machdep.c:176:2: error: use of undeclared identifier 'interrupt_sorted' Message-ID: <20180831052805.GP2340@kib.kiev.ua> References: <524214ac-e3ca-53cd-aee3-dac9212e9800@capeaugusta.com> <0aa35f96-9f62-bfca-c04a-f6ddcb1ce738@FreeBSD.org> <8ed7961e-e12a-9267-2bd0-a9bcbe383c7f@protected-networks.net> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8ed7961e-e12a-9267-2bd0-a9bcbe383c7f@protected-networks.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 05:28:22 -0000 On Fri, Aug 31, 2018 at 12:21:02AM -0400, Michael Butler wrote: > On 8/29/18 7:40 PM, John Baldwin wrote: > > On 8/29/18 4:20 PM, Ian FREISLICH wrote: > >> Hi > >> > >> I see the definition of interrupt_sorted is #ifdefed out by #ifdef SMP > >> at line 84.š My system is UP so I'm not compiling an SMP kernel. > >> > >> /usr/src/sys/x86/x86/intr_machdep.c:176:2: error: use of undeclared > >> identifier 'interrupt_sorted'; did you mean 'interrupt_sources'? > >> ššššššš interrupt_sorted = mallocarray(num_io_irqs, > >> sizeof(*interrupt_sorted), > >> ššššššš ^~~~~~~~~~~~~~~~ > >> ššššššš interrupt_sources > >> /usr/src/sys/x86/x86/intr_machdep.c:83:24: note: 'interrupt_sources' > >> declared here > >> static struct intsrc **interrupt_sources; > >> šššššššššššššššššššššš ^ > >> /usr/src/sys/x86/x86/intr_machdep.c:176:54: error: use of undeclared > >> identifier 'interrupt_sorted'; did you mean 'interrupt_sources'? > >> ššššššš interrupt_sorted = mallocarray(num_io_irqs, > >> sizeof(*interrupt_sorted), > > > > Probably just needs #ifdef SMP around the mallocarray(). I'll test locallyon a UP kernel config. > > > > I see another problem after using Ian's workaround of moving the #ifdef > SMP; it seems I now run out of kernel stack on an i386 (Pentium-III) > machine with only 512MB of RAM: > > Aug 29 23:29:19 sarah kernel: vm_thread_new: kstack allocation failed > Aug 29 23:29:26 sarah kernel: vm_thread_new: kstack allocation failed > Aug 29 23:29:30 sarah kernel: vm_thread_new: kstack allocation failed > Aug 29 23:29:38 sarah kernel: vm_thread_new: kstack allocation failed > Aug 29 23:29:38 sarah kernel: vm_thread_new: kstack allocation failed > Aug 29 23:29:40 sarah kernel: vm_thread_new: kstack allocation failed What is the kernel revision for "now". What was the previous revision where the kstack allocation failures did not happen. Also, what is the workload ?