From owner-freebsd-hackers@freebsd.org Sun Feb 23 04:37:00 2020 Return-Path: Delivered-To: freebsd-hackers@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 9C23325874C for ; Sun, 23 Feb 2020 04:37:00 +0000 (UTC) (envelope-from takumijohn0806@gmail.com) Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 48QC8W1L5Fz4C0q for ; Sun, 23 Feb 2020 04:36:58 +0000 (UTC) (envelope-from takumijohn0806@gmail.com) Received: by mail-wm1-x32e.google.com with SMTP id a9so5927912wmj.3 for ; Sat, 22 Feb 2020 20:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=uU4Ok5hVl1UtoaT33Ne7UWqNcHRnYK347S4DFBc+Ick=; b=tw1WwLvbT6D899CkXuREVoy1nni0kwpFXqMbHIHvWXBmfbwqXgt3yYup7plTqv7yO0 NtPCGI6D6HqO6ulbWzRAVRPEmTrrdsqQNIaHWFMmHV17G15UqsLcmSvfOpLTM1WS9mw6 gIYws8EDyKCSk9dAzkHJk+x8e/NNGswQsDHjTlE2cZ4O2xgoR4EhiBV3ghCaGPAhqqNE Od7+j7XjhYOdzxpL6x+rR2HC1/JZb5kHA+s+pDiCXv0vBz5R6g8bLVH9YYdS8tTzf5zI iCld2jkD8brP9pg9Ji9iOK3jCT5GsHDPms5rS4f4t70kqwwM6nF1zZZlGZaW6ZiNuvdn 7Xrg== 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:content-transfer-encoding; bh=uU4Ok5hVl1UtoaT33Ne7UWqNcHRnYK347S4DFBc+Ick=; b=hyTZOoiYnuYdMqygVg2rx1wC4i6TVfx/bdK/6ZZ9bdVVO6mvrqF/kHhC5+vvbw7uYS kwffnSCUDeu9FwcAwzoieVC6Kc4iIzGbZzze4sOj+scZwfQDFPPQtuBXIy9vkV2rrmnn oH59LSchbjNi2V39M+U15BD1JxeiHKcJY6WqN5XrYwG8KqLFcPshHvdj8TvjItzIBxt7 8A/zlSECoIErZNmSlgAQUbe5sW9zaSr6m8w36SPwWlWHPhXMbuel2+5aN8VFFIt/TOdq N7FVEzjb4/fzxsW4CaC/zW0O4V+LGHD+RgZ5iTRilUGIlow5z++v3hjAxssXEFmJR9hk YPtg== X-Gm-Message-State: APjAAAVQEDEH3Oj6Zf51VgKSEPmtH4aQS2M1mKOZjqQVwpxshHMKJcai DzNxMEcMaB/vx2QDBQkAZeAmP8rP7Q8iq033jjuzm0NbIkI= X-Google-Smtp-Source: APXvYqxd45V+k7Xc7cXKOLKSMcQ5d3VgFUfknsmKSQiznETtWzrJ9oh//BJ8L5f9MMmbSiv8L3F7EMF3ZOlCClTv71U= X-Received: by 2002:a7b:c957:: with SMTP id i23mr13969392wml.174.1582432616660; Sat, 22 Feb 2020 20:36:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Takumi Kataoka Date: Sun, 23 Feb 2020 13:36:45 +0900 Message-ID: Subject: Re: Question about Google Summer 2020 To: Peter Beckman Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48QC8W1L5Fz4C0q X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=tw1WwLvb; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of takumijohn0806@gmail.com designates 2a00:1450:4864:20::32e as permitted sender) smtp.mailfrom=takumijohn0806@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; IP_SCORE(0.00)[ip: (-9.24), ipnet: 2a00:1450::/32(-2.42), asn: 15169(-1.67), country: US(-0.05)]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[e.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; INTRODUCTION(2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 04:37:00 -0000 Thank you, Beckman I have another question now. I checked GSoC ideas list webpage: https://wiki.freebsd.org/SummerOfCodeIde= as and I found "?" on mentor column of "Dual-stack traceroute(1) command" proj= ect. Who is going to be mentor of this project ? Sincerely, Takumi Kataoka 2020=E5=B9=B42=E6=9C=8823=E6=97=A5(=E6=97=A5) 4:44 Peter Beckman : > > The description: > > "Currently there are two traceroute tools: traceroute (for IPv4 networks)= , > and traceroute6 (for IPv6 networks). Between the two commands there's a l= ot > of duplicate functionality, but there's also a lot of necessary divergenc= e. > Unifying these commands (and allowing user selection for IPv4 or IPv6 > functionality) would mean only requiring one utility." > > My read from this is: > > 1. Create a new "traceroute" tool > 2. based on the existing traceroute/traceroute6 code > 2. in C > 3. Accepts either an IPv4 _OR_ and IPv6 address > 4. Works correctly for whatever the valid input is > 5. unifies the two separate commands currently > 6. Intelligently re-use shared code > > Unit test cases: > > traceroute 8.8.8.8 > traceroute 2607:f8b0:4004:815::200e > > Beckman > > On Sun, 23 Feb 2020, Takumi Kataoka wrote: > > > Hi , > > My name is Takumi and senior college student in Japan. > > I'm thinking to participate Google Summer of Code 2020. > > And I'd like to work on FreeBSD. > > > > I found "Dual-stack traceroute(1) command" in GSoC ideas list , it's > > sound interesting for me. > > Could you tell me more details about it? > > > > Sincerely, > > Takumi Kataoka > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg" > > > > -------------------------------------------------------------------------= -- > Peter Beckman Internet G= uy > beckman@angryox.com http://www.angryox.co= m/ > -------------------------------------------------------------------------= -- From owner-freebsd-hackers@freebsd.org Sun Feb 23 07:00:29 2020 Return-Path: Delivered-To: freebsd-hackers@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 E14C625AC96; Sun, 23 Feb 2020 07:00:29 +0000 (UTC) (envelope-from babupalit@gmail.com) Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) (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 48QGL459n4z4ZtR; Sun, 23 Feb 2020 07:00:28 +0000 (UTC) (envelope-from babupalit@gmail.com) Received: by mail-ot1-x343.google.com with SMTP id i6so5912484otr.7; Sat, 22 Feb 2020 23:00:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u6RbcMvweXR7Vyl+3iO9jvT7UjWnMwtPQHuJ6MoW3+4=; b=KOHItPFdV/MIyBwi1ILDotGRgKcMxrkhj3aSngeIuH1N6nT/ROaGXmbD9LbzwocTWs Xz63YS/FwBklYGqgOq8Ny/G2NdpFaruKUDW7FTxW5KN2hWHGIkJHx0sBNwe2eSAKeW0r 42MKM6kSm744l+qAGBT8wVHzuHGaqwufSh77daQ6kMJNd7PMY59pae7joUsMqb4P2aHn nDzSyJW4EQ4tCuSSwCoNddAtz0yFJyukOG8zlQtbegyHLOYjoDz2b/Q4K45LJKwqhumF zhYjnOLsKUMGGsNsbBcI43/HlFLNT8iop7boqHvSd754Ukjp5nkmq18A2Vv58qqNctWd 3RNA== 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=u6RbcMvweXR7Vyl+3iO9jvT7UjWnMwtPQHuJ6MoW3+4=; b=YLxh65JHPPMEMfjQyt7VYlF2dYetH/kF7kPvVyzVGq4ugUmOMITxaUGx86nkpXZAnf qt8pT0FjH6hX308I2IF8WPa7KAk1aVln0oJmsd4g+K3kQ5V7OklqaoU78HpwXbdxs2C3 fDd4nUAb7DIDFzD4Qg87uGqfsBHYfnNKZSMTrn64g4jLZqrEELGvK4kEviYYVA2uaKRK Nt+R9wy+KXpympyYgfAnncjyrF8Jxe2L9nywY9fnAKAeP1P6NYIcRKIOYWcJtYXoXS66 tNDrFBJztOp+euIcr8tzWLDpxx8mbV623eSNlZmurn/bNwhwYpXD5kA7+L9b41r9Kki0 cZtQ== X-Gm-Message-State: APjAAAXoufapnxsd/ttmFVYBzggznuqPpYAeHxUqhUN079efJEs5GtXE cuOrGKAC2SbISqKry4qOvresqbbrhsln/lyZ6i2aghdw X-Google-Smtp-Source: APXvYqzpLC7Wjk92xcY1BZDAp9f83aQ1u1vMwM8RA/mm1f4lb/mW4cRpUwk+jpQFVdUvUozKARPQXOfgTkhHlId8qkI= X-Received: by 2002:a9d:4e82:: with SMTP id v2mr21085413otk.352.1582441226808; Sat, 22 Feb 2020 23:00:26 -0800 (PST) MIME-Version: 1.0 References: <890a299c074fc83a02911583531d686257924be8.camel@freebsd.org> In-Reply-To: <890a299c074fc83a02911583531d686257924be8.camel@freebsd.org> From: Arpan Palit Date: Sun, 23 Feb 2020 12:30:15 +0530 Message-ID: Subject: Re: msleep_spin is failed to waken up even after wakeup routine is invoked for the same. To: Ian Lepore Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org X-Rspamd-Queue-Id: 48QGL459n4z4ZtR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=KOHItPFd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of babupalit@gmail.com designates 2607:f8b0:4864:20::343 as permitted sender) smtp.mailfrom=babupalit@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (2.88), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[3.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 07:00:30 -0000 Thanks for replying Ian. The code is similar to the fix structure code as you have mentioned above. Its happening after running the test for 5 to 10 iterations, out of 2k posted command to the hardware only 1 or 2 of them are failing to wake up properly. mutex lock has been properly introduced in both wait_for_completion code & interrupt handler part and also the doneflag is getting set from the interrupt context properly. I am running 16 thread of 2k command simultaneously. I have verified that from the hardware side the command completion is proper, its failing in waking up the sleep in software side. So I am suspecting some issue with the scheduler which failed to wake up the sleep in this case. Below is the current code structure: /* Wait for Completion */ mtx_lock(cmd_comp_lock); completion = false; ret = execute_cmd(cmd); if (ret == 0) { while ( !completion && err == 0) err = msleep(cmd, cmd_comp_lock, PCATCH, "cmd_xfer", hz); } mtx_unlock(cmd_comp_lock); /* Interrupt handler */ mtx_lock_spin(cmd_lock); *//Disable inerrupt *// error checks completion = true; wakeup_one(cmd); mtx_unlock_spin(cmd_lock); *//Enable interrupt On Wed, Feb 19, 2020 at 8:12 PM Ian Lepore wrote: > On Wed, 2020-02-19 at 14:13 +0530, Arpan Palit wrote: > > Hi, > > > > I am facing one issue where wakeup rountine call is unable to waken up a > > msleep_spin routine call with a timeout value of 10 Seconds. > > > > The real scenario is as follows: post a hardware command and sleep using > > msleep_spin routine till interrupt comes, After getting the interrupt > waken > > up the sleeping process using wakeup_one/wakeup routine call. As there > are > > more than 2048 command and 16 parallel threads are running, > > observed randomly *one or two of the posted command* is *timing out* for > > which the *interrupt has came and also wakeup routine is invoked *after > > getting the interrupt for the same command. > > > > Note: > > *The issue is not seen when number of commands are less than 2048 with > > timeout of 10 seconds. > > *The issue can be seen with less number of commands also when timeout > value > > 1 second. > > > > Can anyone please provide me an optimized way to schedule the process or > a > > better way to do the scheduling. > > > > Thanks, > > Arpan Palit > > > > Is there any chance this is the classic "missed wakeup" scenario, where > the wakeup happens before the thread enters msleep_spin()? That can > happen with code structured like > > enqueue_request(req); > err = msleep_spin(req, etc); > /* Handle done req or timeout */ > > and a fix is to structure the code using the same idiom required for > pthread_cond_wait() in userland, something like: > > req->doneflag = false; > enqueue_request(req); > while (!req->doneflag && err == 0) > err = msleep_spin(req, etc); > /* Handle done req or timeout */ > > and of course on the interrupt handler side you need something like > > /* lock mutex, do hardware stuff */ > req->doneflag = true; > wakeup(req); > /* unlock mutex */ > > -- Ian > > > From owner-freebsd-hackers@freebsd.org Sun Feb 23 19:48:31 2020 Return-Path: Delivered-To: freebsd-hackers@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 6A8CE246420 for ; Sun, 23 Feb 2020 19:48:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48QbNG1DZSz41Pq for ; Sun, 23 Feb 2020 19:48:29 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1582487308; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=dQ2MueuSAaLfkKomJGG3ZiX1Tz/0x5M3N+nc1FdGAi1+pQZMUw3qyPiB6arQs84AxKzNuTzISCAeV Y+iBhqLwBMwV3NG1CxdRsfw50DUKz2UDP7Vs4lX2Rtuu9/bwBHaYlvnbQWbXtIBjYhjHWnI0wAyND8 PPCECweziZH+r1X6rSoRutIK1AJ+FRtZ7UE4IPjt9zTmQt1QuIsymEtxjHJsvWXq3YYuNuEB8tvD4Q e27BcLc2mQnDyGpfL8NtDwwZpuUDPweOCQp0mudY4mAilzUqeN/F6L48QZ2+Ymc2UFh1MYnaNTCxGK U6EUpuQgF9CG2KimFCvf9Uh5pRWXY9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=sKknGiZFuF7RnYPwxL1LAwKqR8u011HA0fP1FpscuFo=; b=VCzNhmopJBF+WNPLPfpWnl7+yD5iBYKa8oJdkMq7dy1JM8bEIPpmjfcI9pb18VYXO3TKka6hAAppa ITEkxR0NwCSZdNFGIyw6gPYIxLmLfKKD0DZDdST8/GcfKp/un8M5dg8WIAU15Vx4WvlIe3P0xLj9Yx E0NfWdkexQzFh+fQReFOg5xBoqW8QiNCY7aMC/6HDo22mMYMKXXhLOWSBHb05lCwtzd4nWX+HVI6JY RXsmKvqZsvFonbDVyqSF7TiZRXTbbuS6vVLkMDX943h1OOKXwRavPcs6rTXsxpfpjsqg/kc/4oHKsx iXAh/nkyUTHzbCElC68hmzvmVfISKaQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=sKknGiZFuF7RnYPwxL1LAwKqR8u011HA0fP1FpscuFo=; b=CDCOAn4oYoMdZ9HDdloZFXNoVGWmV5S7RlkIL1+8qr8oEXVAbwmYk20wOIuj6IwyoDLqDpCKQf8dD zi4MnKzXgRN6Gl3cOTV8Nga9Aq5pRIFIuBcYziRisnDPA24989pr8pW8qvA0XSRmR5cM0izN0rGJMd hoo3SpQe1nBviLOpE90g68CjlWUpOv89oNcK+F77loOg8K+ikCoyYK7BaUp2D9zYVgEyowoB8uhis2 73Nj36cYEbWgd0fpaH6cn3VgYBvcrfRyPIVLXC2A2TXYzVZ4+yzTav3JyZUQrgDEIWE+ssBg7fnVYd zWsoJ/r6D0AHqgbhs+an071hrZskgMg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 7515ba2f-5675-11ea-b80e-052b4a66b6b2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 7515ba2f-5675-11ea-b80e-052b4a66b6b2; Sun, 23 Feb 2020 19:48:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 01NJmQQD020048; Sun, 23 Feb 2020 12:48:26 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <08fd4dcf7231237abf749834d6bce006892eac26.camel@freebsd.org> Subject: Re: msleep_spin is failed to waken up even after wakeup routine is invoked for the same. From: Ian Lepore To: Arpan Palit Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Date: Sun, 23 Feb 2020 12:48:26 -0700 In-Reply-To: References: <890a299c074fc83a02911583531d686257924be8.camel@freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48QbNG1DZSz41Pq X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.968,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-0.996,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 19:48:31 -0000 On Sun, 2020-02-23 at 12:30 +0530, Arpan Palit wrote: > Thanks for replying Ian. > > The code is similar to the fix structure code as you have mentioned above. > > Its happening after running the test for 5 to 10 iterations, out of 2k > posted command to the hardware only 1 or 2 of them are failing to wake > up properly. mutex lock has been properly introduced in both > wait_for_completion code & interrupt handler part and also the doneflag is > getting set from the interrupt context properly. > > I am running 16 thread of 2k command simultaneously. > > I have verified that from the hardware side the command completion is > proper, its failing in waking up the sleep in software side. > > So I am suspecting some issue with the scheduler which failed to wake up > the sleep in this case. > > Below is the current code structure: > > /* Wait for Completion */ > mtx_lock(cmd_comp_lock); > completion = false; > ret = execute_cmd(cmd); > if (ret == 0) { > while ( !completion && err == 0) > err = msleep(cmd, cmd_comp_lock, PCATCH, "cmd_xfer", hz); > } > mtx_unlock(cmd_comp_lock); > > /* Interrupt handler */ > mtx_lock_spin(cmd_lock); > *//Disable inerrupt > *// error checks > completion = true; > wakeup_one(cmd); > mtx_unlock_spin(cmd_lock); > *//Enable interrupt > That shows two different mutexes being used, which violates the safe pattern for doing conditional wakeups. The same mutex that protects the setting of the 'completion' variable in the interrupt handler must be used to protect the clearing and testing of that variable in the mainline code, to avoid missed wakeups. That means using msleep_spin() with cmd_lock in the mainline code. -- Ian > > On Wed, Feb 19, 2020 at 8:12 PM Ian Lepore wrote: > > > On Wed, 2020-02-19 at 14:13 +0530, Arpan Palit wrote: > > > Hi, > > > > > > I am facing one issue where wakeup rountine call is unable to > > > waken up a > > > msleep_spin routine call with a timeout value of 10 Seconds. > > > > > > The real scenario is as follows: post a hardware command and > > > sleep using > > > msleep_spin routine till interrupt comes, After getting the > > > interrupt > > > > waken > > > up the sleeping process using wakeup_one/wakeup routine call. As > > > there > > > > are > > > more than 2048 command and 16 parallel threads are running, > > > observed randomly *one or two of the posted command* is *timing > > > out* for > > > which the *interrupt has came and also wakeup routine is invoked > > > *after > > > getting the interrupt for the same command. > > > > > > Note: > > > *The issue is not seen when number of commands are less than 2048 > > > with > > > timeout of 10 seconds. > > > *The issue can be seen with less number of commands also when > > > timeout > > > > value > > > 1 second. > > > > > > Can anyone please provide me an optimized way to schedule the > > > process or > > > > a > > > better way to do the scheduling. > > > > > > Thanks, > > > Arpan Palit > > > > > > > Is there any chance this is the classic "missed wakeup" scenario, > > where > > the wakeup happens before the thread enters msleep_spin()? That > > can > > happen with code structured like > > > > enqueue_request(req); > > err = msleep_spin(req, etc); > > /* Handle done req or timeout */ > > > > and a fix is to structure the code using the same idiom required > > for > > pthread_cond_wait() in userland, something like: > > > > req->doneflag = false; > > enqueue_request(req); > > while (!req->doneflag && err == 0) > > err = msleep_spin(req, etc); > > /* Handle done req or timeout */ > > > > and of course on the interrupt handler side you need something like > > > > /* lock mutex, do hardware stuff */ > > req->doneflag = true; > > wakeup(req); > > /* unlock mutex */ > > > > -- Ian > > > > > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Mon Feb 24 02:23:08 2020 Return-Path: Delivered-To: freebsd-hackers@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 1662424FDAA for ; Mon, 24 Feb 2020 02:23:08 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48Qm7b4ssnz3xgh for ; Mon, 24 Feb 2020 02:23:07 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id A71A624FDA9; Mon, 24 Feb 2020 02:23:07 +0000 (UTC) Delivered-To: hackers@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 A6DC024FDA8 for ; Mon, 24 Feb 2020 02:23:07 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 48Qm7Y5bCQz3xd4 for ; Mon, 24 Feb 2020 02:23:05 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-wm1-x334.google.com with SMTP id a6so7680809wme.2 for ; Sun, 23 Feb 2020 18:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=mDR+Xl2wx8KDJPJAjdcyvR0lvj8bxkkOHOW9lRZA4/g=; b=dNYisNJDEx8CrnDEIADH0vzZoatm21HXvVMsqgAR2oCg96jwM4U7HYOPzAhQ63A9lI p/sYgl2E3pvnkh9cZifTOSU8gVFwXGpSpuB9bY6Ahxlbb1sY90k1GL+Qaies2xHD0AWK Zlmy5ncaRiJ+PlxyTElmCyztknEDrWbNuV+KfPgocwgrKqQuHfcJpbf6kiQ1dbDnwgH2 ADRufN2CDjSbvj6UFO4tH6w87UnUHS1d98nJwIFf9buAt92WRARGOLRPx7zm0XUE4zFn BSdb4NznIEyZPicu/6NF4dazuNZM9W90UgWo4cco9F89lFiHAEbmqK4WxYz9pdBJkG2V vAGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=mDR+Xl2wx8KDJPJAjdcyvR0lvj8bxkkOHOW9lRZA4/g=; b=Kw7VnoTwLLcshytFwVxwDz57lMyNr/IAJJ7kNSVXIdFM2Ni3LylBHP6pXlGMWhrot+ AhSk01nu2auiD/+N6PROu4B/zyMgqb7FQNDjZBykq7CMtf6WdNJoaOCbwgdYCkmzknYh Y5xZ8+D/3PFawdwSJJUNvw4qwX2jU5lPbCnmakf3XQCRH+QcGcashDDEuYeshzVdtvvQ 6DDZJRtBtpIVd/rbBcKmD4JNWo55l+Jp4PrvfStWGbmZ321iko1K5MfIOknOYyR8f1V1 10NVGnannGOz03cDd6kbOlmW7yEyOKxwIlrtPhk7bclraWpbbVCn5+N6WzJti+j4nGnt hTtA== X-Gm-Message-State: APjAAAW6lr+LIxvpVKMU69gHNlWcQsZiiAkdpMaxd/vDOuM1JFw2BbJU A4MfQfqfGFlVoJm4jqee2mBCSety X-Google-Smtp-Source: APXvYqz6jnc2v8gB4rotsNPU89AEKT+h1VLm4gHw3ukAQVQcXiXsfycnHPIo26qsfbLihCjfUX5x1Q== X-Received: by 2002:a7b:c2a2:: with SMTP id c2mr12127856wmk.19.1582510983455; Sun, 23 Feb 2020 18:23:03 -0800 (PST) Received: from localhost ([213.149.54.193]) by smtp.gmail.com with ESMTPSA id o9sm16467178wrw.20.2020.02.23.18.23.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 18:23:03 -0800 (PST) Date: Mon, 24 Feb 2020 03:23:00 +0100 From: Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= To: hackers@freebsd.org Subject: Slow PXE boot Message-ID: <20200224032300.00006290@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48Qm7Y5bCQz3xd4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=dNYisNJD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rank1seeker@gmail.com designates 2a00:1450:4864:20::334 as permitted sender) smtp.mailfrom=rank1seeker@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-8.79), ipnet: 2a00:1450::/32(-2.41), asn: 15169(-1.67), country: US(-0.05)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[4.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 02:23:08 -0000 Yo Crew! During PXE boot, from server (11.3-RELEASE-p5 i386) with 1 GB RAM, client w= ith: 4 GB RAM booted kernel in ~2 min 8 GB RAM booted kernel in ~20 min (at least) So all below is tested with 2 different clients, each with NIC of different= manufacturer (Realtec & Intel) I've read on forums that if client has much, much more RAM than server, thi= s happens. Suggestion was to to set loader(8) tunable hw.memtest.tests to 0, so client= would skip RAM test. PXE boot is served to clients from /PXE, so ... Setting hw.memtest.tests=3D"0" in /PXE/boot/loader.conf, yielded no results! By the way, for some reason, hw.memtest.tests tunable DOESN'T exist in man = pages! I had to look in source code to confirm it still exists. Next, I've tried: # echo 'nfs.read_size=3D"16384"' > /PXE/boot/loader.conf Changing value to ANY value other than default 1024, completely halts c= lient's kernel loading at 'Loading kernel...'! Lastly, I've tried tactic used with UFS's stage 2 /boot/boot, to skip stage= 3 loader completely and to directly load kernel instead. So in dhcpd.conf, I've replaced: filename "boot/pxeboot"; with: filename "boot/kernel/kernel"; Result: Attempt to pull GENERIC kernel directly, resulted in: "NBP is too big t= o fit in free base memory" Maybe I should try to compile custom minimal kernel 'ident PXE' ... It is unbelievable how many problems do I have ... Domagoj Smol=C4=8Di=C4=87 From owner-freebsd-hackers@freebsd.org Mon Feb 24 13:47:35 2020 Return-Path: Delivered-To: freebsd-hackers@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 A5ACE25D302 for ; Mon, 24 Feb 2020 13:47:35 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48R3KL5t5cz3G28 for ; Mon, 24 Feb 2020 13:47:34 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mailman.nyi.freebsd.org (Postfix) id B25F725D2FC; Mon, 24 Feb 2020 13:47:34 +0000 (UTC) Delivered-To: hackers@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 B19D725D2F8 for ; Mon, 24 Feb 2020 13:47:34 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 48R3KJ4fW8z3FyR for ; Mon, 24 Feb 2020 13:47:32 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-qt1-x82b.google.com with SMTP id r5so6542935qtt.9 for ; Mon, 24 Feb 2020 05:47:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount-org.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=DZMjjZTm7LqE5ipzaUCK2F2ItO3Ijdwzkai87ki8UQA=; b=cQhzHmRA/NDYene6J1aS016FlcpK+xuYm5YlCPJT/ziahG2j0ifJIDzufhZf86NqpS l22sGvECvAIDUc2L3eKa7oi+GTlWeIQMcLjUVP2YzEEQCYEppZdM0aXTyXOV/loCBDzo FgevE7hCl1g2EhPtkRWiysURO2/2PtwpQk1GG/kWYnAMxJqhwq5CQmkMvw8iCNRJqCgh Kfswnr0InQqNdS6D9DZBQG+SRQVVrK7NDlhpSSR2wIqREuUQBpwJuWYe5C+auATZMSzQ X/ayCHS0F7CHfznKY6Xevxbne8g4enxEDnf9PUlOIIaP8vBDxkxQxAyke29kIcaPie4z 9Ygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=DZMjjZTm7LqE5ipzaUCK2F2ItO3Ijdwzkai87ki8UQA=; b=RiGSk03GclHYs2q9p29h5+pkmwpAJkgNSYPy/lx2DfLoSe5NT0W23jvEzvbJ1dxpqy j4GHpfI0afFo5EbLwLPcQRHcQiIR3iOm3IYvkDD1v3nKmj5a3jmVqZk0K3lMG1OawUWI oq4o3fVF6p2EL1qsQKBeALxeO0yWFy15aHQyEga+hxaeppr0spzOpESgWtVRaYSpkmHq IFePHy2P4HSULAtHTgXpE2o0yia4rlFgLg/EHN517sxXW+nG2WKOaP9yxKDqzC5xayJt xtsOz/eyHVzXRh/vsWblj8Vlo4lzZBVHe6KdiGGael86JYxTeBur+lP9bqE8dv0/6hXu +N7w== X-Gm-Message-State: APjAAAVywarK/B3Zc3atDhuQQHymL21wAZcYMS10fhGYlfS50uFvufYm bICxTdxiX3a1UbvcB9tEdXiuJoxsXjQ= X-Google-Smtp-Source: APXvYqxi+k+4P9A5MNR3BGRqomLmtvdIdyCZDIvmKqJofj8/qYPE1hOqN+EC9TZXlS/JSn4MCb2GAw== X-Received: by 2002:ac8:6046:: with SMTP id k6mr49486886qtm.357.1582552050807; Mon, 24 Feb 2020 05:47:30 -0800 (PST) Received: from ?IPv6:2600:1017:b40e:274c:690a:2278:d7ba:c7a7? ([2600:1017:b40e:274c:690a:2278:d7ba:c7a7]) by smtp.gmail.com with ESMTPSA id v50sm6213725qtb.20.2020.02.24.05.47.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Feb 2020 05:47:30 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Mark Saad Mime-Version: 1.0 (1.0) Subject: Re: Slow PXE boot Date: Mon, 24 Feb 2020 08:46:20 -0500 Message-Id: <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> References: <20200224032300.00006290@gmail.com> Cc: hackers@freebsd.org In-Reply-To: <20200224032300.00006290@gmail.com> To: =?utf-8?Q?Domagoj_Smol=C4=8Di=C4=87?= X-Mailer: iPhone Mail (17D50) X-Rspamd-Queue-Id: 48R3KJ4fW8z3FyR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=longcount-org.20150623.gappssmtp.com header.s=20150623 header.b=cQhzHmRA; dmarc=none; spf=none (mx1.freebsd.org: domain of nonesuch@longcount.org has no SPF policy when checking 2607:f8b0:4864:20::82b) smtp.mailfrom=nonesuch@longcount.org X-Spamd-Result: default: False [-4.38 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[longcount-org.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; DMARC_NA(0.00)[longcount.org]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[longcount-org.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[b.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.58)[ip: (-9.31), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 13:47:35 -0000 Domagoj=20 I regularly boot 11.3-Stable and 12.1-Stable amd64 on servers with 64gb, 1= 28gb , and occasional more . I do t have that issue . Can you take a peak at= the switch your boxes are attached to ; It sounds like a device is running a= t 100mb 1/2 duplex . I remember the realtec nics doing this when set to auto= .=20 --- Mark Saad | nonesuch@longcount.org > On Feb 23, 2020, at 9:23 PM, Domagoj Smol=C4=8Di=C4=87 wrote: >=20 > =EF=BB=BFYo Crew! >=20 > During PXE boot, from server (11.3-RELEASE-p5 i386) with 1 GB RAM, client w= ith: > 4 GB RAM booted kernel in ~2 min > 8 GB RAM booted kernel in ~20 min (at least) > So all below is tested with 2 different clients, each with NIC of differen= t manufacturer (Realtec & Intel) >=20 > I've read on forums that if client has much, much more RAM than server, th= is happens. > Suggestion was to to set loader(8) tunable hw.memtest.tests to 0, so clien= t would skip RAM test. >=20 > PXE boot is served to clients from /PXE, so ... > Setting hw.memtest.tests=3D"0" in /PXE/boot/loader.conf, yielded no result= s! >=20 > By the way, for some reason, hw.memtest.tests tunable DOESN'T exist in man= pages! > I had to look in source code to confirm it still exists. >=20 >=20 > Next, I've tried: > # echo 'nfs.read_size=3D"16384"' > /PXE/boot/loader.conf > Changing value to ANY value other than default 1024, completely halts c= lient's kernel loading at 'Loading kernel...'! >=20 >=20 > Lastly, I've tried tactic used with UFS's stage 2 /boot/boot, to skip stag= e 3 loader completely and to directly load kernel instead. > So in dhcpd.conf, I've replaced: > filename "boot/pxeboot"; > with: > filename "boot/kernel/kernel"; >=20 > Result: > Attempt to pull GENERIC kernel directly, resulted in: "NBP is too big t= o fit in free base memory" > Maybe I should try to compile custom minimal kernel 'ident PXE' ... > It is unbelievable how many problems do I have ... >=20 >=20 >=20 > Domagoj Smol=C4=8Di=C4=87 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"= From owner-freebsd-hackers@freebsd.org Tue Feb 25 20:34:04 2020 Return-Path: Delivered-To: freebsd-hackers@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 9F37623E6D1 for ; Tue, 25 Feb 2020 20:34:04 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48RrHw0jVsz3xPy for ; Tue, 25 Feb 2020 20:34:04 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id C556023E6D0; Tue, 25 Feb 2020 20:34:03 +0000 (UTC) Delivered-To: hackers@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 C505B23E6CF for ; Tue, 25 Feb 2020 20:34:03 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 48RrHt5FJ2z3xMV for ; Tue, 25 Feb 2020 20:34:02 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: by mail-il1-x130.google.com with SMTP id l4so385116ilj.1 for ; Tue, 25 Feb 2020 12:34:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=aAPL233TUKph/pi7u8NiHHAHWtQIV2By3uGYpjdSChE=; b=sB0qevLPhIWn6YUgEkJcGQnPyqueu1RIHQulovqvhsHkkyF09Y89GAqi63JKfbU1C6 j30OsM+/e28O7mRyP+AKkFQCYOdbT8F78SAVhqVcDDyEocp7SUnuZicmMvCkxWX5SUwG gUHrQoSGmnt/wHxuL47zjZA+Di1xXZTzYSP+oFu7XD7d/FbwJeyeTlLWk5J0loylkfUX eL/UPbat5nXOJlM00lxj/4nz7s/GteS3ja0Hi88wPbXu15pGnJsJ3s6PDEfMRfcm13AZ Le8u7A4u2UlBgdKS+tmMIeZFa5Dw36YIirvRRiGLnuSNvlNrDTOb7K4i5pRDDZpbT2EU gVmw== 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; bh=aAPL233TUKph/pi7u8NiHHAHWtQIV2By3uGYpjdSChE=; b=F138N1c9uTxQFZjhlwOJKxAWhynfmerG9XwpnRvIzk4h8JhP5EC9HeD6xWnqitB9PR 4z2GIeeJjs3DoMalvwqEo2/fGVU70oht9DaOiLywLIQ/Fu2pnNhA9z5WyiqdkzRLJ6nW MYYHw0R8q0EfmTrEzqu4Rhz1tL8ZNBKkENmznI4WVvSbGNjTjABrB0N5yaAFpYitIuG3 JZf8ZTempBj2j3+tcZdJnUMM5FcczZCQs7Ngfgg2JDe+JG1+049IKFQP99ekqRnkQabg OAR6VLdxPI61te+neHOyiKoOpseawzS1euXdtS+RkeSu8V+/kbKMZE7kcM9ktBBdc288 rPGQ== X-Gm-Message-State: APjAAAUaStGVg5Y7tawNdFoGmlaPdAnIlWQAf+/9mE37z5KcTztiwT3e J1+ygNcPIWFzg5hCHD+5pAN3nBWK2IaGeqrHe0liIXcB X-Google-Smtp-Source: APXvYqx28poCKPUs3XIrLiupNGzIM0nZvyl4tfG32cD4eYMsEn24tfTdej60/8KlKkGDlM9ODx20MgRDT8Q0lm0NCqM= X-Received: by 2002:a92:50f:: with SMTP id q15mr491209ile.47.1582662840912; Tue, 25 Feb 2020 12:34:00 -0800 (PST) MIME-Version: 1.0 References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> In-Reply-To: <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> From: Michio Honda Date: Tue, 25 Feb 2020 20:33:48 +0000 Message-ID: Subject: Re: Slow PXE boot To: hackers@freebsd.org X-Rspamd-Queue-Id: 48RrHt5FJ2z3xMV X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=sB0qevLP; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of micchiegml@gmail.com designates 2607:f8b0:4864:20::130 as permitted sender) smtp.mailfrom=micchiegml@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (-8.45), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[0.3.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 20:34:04 -0000 Hi, I had a similar problem before, and the solution was the use of pxeboot file taken from FreeBSD 10 as suggested by Hiroki. Cheers, - Michio On Mon, Feb 24, 2020 at 1:48 PM Mark Saad wrote: > Domagoj > I regularly boot 11.3-Stable and 12.1-Stable amd64 on servers with > 64gb, 128gb , and occasional more . I do t have that issue . Can you take= a > peak at the switch your boxes are attached to ; It sounds like a device i= s > running at 100mb 1/2 duplex . I remember the realtec nics doing this when > set to auto . > > --- > Mark Saad | nonesuch@longcount.org > > > On Feb 23, 2020, at 9:23 PM, Domagoj Smol=C4=8Di=C4=87 > wrote: > > > > =EF=BB=BFYo Crew! > > > > During PXE boot, from server (11.3-RELEASE-p5 i386) with 1 GB RAM, > client with: > > 4 GB RAM booted kernel in ~2 min > > 8 GB RAM booted kernel in ~20 min (at least) > > So all below is tested with 2 different clients, each with NIC of > different manufacturer (Realtec & Intel) > > > > I've read on forums that if client has much, much more RAM than server, > this happens. > > Suggestion was to to set loader(8) tunable hw.memtest.tests to 0, so > client would skip RAM test. > > > > PXE boot is served to clients from /PXE, so ... > > Setting hw.memtest.tests=3D"0" in /PXE/boot/loader.conf, yielded no > results! > > > > By the way, for some reason, hw.memtest.tests tunable DOESN'T exist in > man pages! > > I had to look in source code to confirm it still exists. > > > > > > Next, I've tried: > > # echo 'nfs.read_size=3D"16384"' > /PXE/boot/loader.conf > > Changing value to ANY value other than default 1024, completely halt= s > client's kernel loading at 'Loading kernel...'! > > > > > > Lastly, I've tried tactic used with UFS's stage 2 /boot/boot, to skip > stage 3 loader completely and to directly load kernel instead. > > So in dhcpd.conf, I've replaced: > > filename "boot/pxeboot"; > > with: > > filename "boot/kernel/kernel"; > > > > Result: > > Attempt to pull GENERIC kernel directly, resulted in: "NBP is too bi= g > to fit in free base memory" > > Maybe I should try to compile custom minimal kernel 'ident PXE' ... > > It is unbelievable how many problems do I have ... > > > > > > > > Domagoj Smol=C4=8Di=C4=87 > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@freebsd.org Tue Feb 25 20:58:21 2020 Return-Path: Delivered-To: freebsd-hackers@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 15A0723FCE7 for ; Tue, 25 Feb 2020 20:58:21 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48Rrqw4M5Wz3D50 for ; Tue, 25 Feb 2020 20:58:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id 67FA223FCE4; Tue, 25 Feb 2020 20:58:20 +0000 (UTC) Delivered-To: hackers@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 61A1323FCE2 for ; Tue, 25 Feb 2020 20:58:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (mx.allbsd.org [IPv6:2001:2f0:104:e001::41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail.allbsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rrqv2Lvmz3D2q for ; Tue, 25 Feb 2020 20:58:18 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail-d.allbsd.org ([IPv6:2409:11:a740:4700:58:65ff:fe00:b0b]) (authenticated bits=56) by mail.allbsd.org (8.15.2/8.15.2) with ESMTPSA id 01PKvvk0003978 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK) (Client CN "/CN=mail-d.allbsd.org", Issuer "/C=US/O=Let's+20Encrypt/CN=Let's+20Encrypt+20Authority+20X3"); Wed, 26 Feb 2020 05:58:07 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from alph.d.allbsd.org ([IPv6:2409:11:a740:4700:16:ceff:fe34:2700]) by mail-d.allbsd.org (8.15.2/8.15.2) with ESMTPS id 01PKvptY091959 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 26 Feb 2020 05:57:52 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [[UNIX: localhost]]) (authenticated bits=0) by alph.d.allbsd.org (8.15.2/8.15.2) with ESMTPA id 01PKvpNS091956; Wed, 26 Feb 2020 05:57:51 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Wed, 26 Feb 2020 05:57:17 +0900 (JST) Message-Id: <20200226.055717.1795667435522458112.hrs@FreeBSD.org> To: hackers@freebsd.org Cc: micchie.gml@gmail.com Subject: Re: Slow PXE boot From: Hiroki Sato In-Reply-To: References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> X-Old-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-PGPkey-fingerprint: 6C0D 2353 27CF 80C7 901E FDD2 DBB0 7DC6 6F1F 737F X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="--Security_Multipart(Wed_Feb_26_05_57_17_2020_667)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.allbsd.org [IPv6:2001:2f0:104:e001:0:0:0:41]); Wed, 26 Feb 2020 05:58:14 +0900 (JST) X-Rspamd-Queue-Id: 48Rrqv2Lvmz3D2q X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.95 / 15.00]; TAGGED_RCPT(0.00)[]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.95)[-0.950,0]; ASN(0.00)[asn:7514, ipnet:2001:2f0::/32, country:JP]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 20:58:21 -0000 ----Security_Multipart(Wed_Feb_26_05_57_17_2020_667)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Michio Honda wrote in : mi> Hi, mi> mi> I had a similar problem before, and the solution was the use of pxeboot mi> file taken from FreeBSD 10 as suggested by Hiroki. I could not reproduce this by using my boxes after all, but replacing pxeboot with the older one was useful to gain the normal speed at that time probably because of difference between new (11 or later) loader's nfs client and the old one. It was a problem sending a lot of duplicated packets for some reason, not just a matter of the buffer size. And the server side was Linux. Have anyone else also experienced this kind of very slow PXE booting? It may be specific to using a Linux NFS server. -- Hiroki ----Security_Multipart(Wed_Feb_26_05_57_17_2020_667)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iMgEABMKAC4WIQRsDSNTJ8+Ax5Ae/dLbsH3Gbx9zfwUCXlWKLRAcaHJzQGZyZWVi c2Qub3JnAAoJENuwfcZvH3N//DsCBRdZFB7RWqFIIlOPxpSPD24nVonY9Eix7rnU eqc7P2hi/huVcd23j40lZmUKqAbNGcL5Saincu05iM+lDi+G+ipGAgdN/8xnx/zO yNgnbIbeODPZgsRVB4hn2rw+6uOwv3ABHd5kUzMO3te2RiY2OQqi+yVxtmmYzjMl fLvXRZ64KTf9Jg== =ijW3 -----END PGP SIGNATURE----- ----Security_Multipart(Wed_Feb_26_05_57_17_2020_667)---- From owner-freebsd-hackers@freebsd.org Tue Feb 25 21:02:16 2020 Return-Path: Delivered-To: freebsd-hackers@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 A02D4240164 for ; Tue, 25 Feb 2020 21:02:16 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48RrwS17cWz3JYJ for ; Tue, 25 Feb 2020 21:02:16 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: by mailman.nyi.freebsd.org (Postfix) id 26CF0240163; Tue, 25 Feb 2020 21:02:16 +0000 (UTC) Delivered-To: hackers@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 26540240161 for ; Tue, 25 Feb 2020 21:02:16 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RrwQ5k23z3JXl; Tue, 25 Feb 2020 21:02:14 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 78BA88D4A50A; Tue, 25 Feb 2020 21:02:07 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 30566E707B8; Tue, 25 Feb 2020 21:02:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id m4ankr4Vc6jF; Tue, 25 Feb 2020 21:02:05 +0000 (UTC) Received: from [169.254.231.217] (unknown [IPv6:fde9:577b:c1a9:4902:2d3b:64e6:77c7:a70]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A50AFE707AE; Tue, 25 Feb 2020 21:02:05 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Hiroki Sato" Cc: hackers@freebsd.org, micchie.gml@gmail.com Subject: Re: Slow PXE boot Date: Tue, 25 Feb 2020 21:02:04 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: <15F7FD1E-3957-4D9E-922F-394D50445BA8@lists.zabbadoz.net> In-Reply-To: <20200226.055717.1795667435522458112.hrs@FreeBSD.org> References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> <20200226.055717.1795667435522458112.hrs@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48RrwQ5k23z3JXl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 195.201.62.131 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-4.98 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.201.62.131]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zabbadoz.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:195.201.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-2.68)[ip: (-9.06), ipnet: 195.201.0.0/16(-2.79), asn: 24940(-1.55), country: DE(-0.02)] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 21:02:16 -0000 On 25 Feb 2020, at 20:57, Hiroki Sato wrote: Hi, > Michio Honda wrote > in > : > > mi> Hi, > mi> > mi> I had a similar problem before, and the solution was the use of > pxeboot > mi> file taken from FreeBSD 10 as suggested by Hiroki. > > I could not reproduce this by using my boxes after all, but replacing > pxeboot with the older one was useful to gain the normal speed at > that time probably because of difference between new (11 or later) > loader's nfs client and the old one. It was a problem sending a lot > of duplicated packets for some reason, not just a matter of the > buffer size. And the server side was Linux. > > Have anyone else also experienced this kind of very slow PXE booting? > It may be specific to using a Linux NFS server. I see it on zoo all day long for ages. I’ll go back and try an old pxeboot; if that really speeds things up massively I might even be willing to debug this a bit more. /bz From owner-freebsd-hackers@freebsd.org Tue Feb 25 22:27:20 2020 Return-Path: Delivered-To: freebsd-hackers@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 BD0AC24274C for ; Tue, 25 Feb 2020 22:27:20 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48Rtpc0Vcnz3wqf for ; Tue, 25 Feb 2020 22:27:20 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: by mailman.nyi.freebsd.org (Postfix) id CEDC924274B; Tue, 25 Feb 2020 22:27:19 +0000 (UTC) Delivered-To: hackers@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 CE78424274A for ; Tue, 25 Feb 2020 22:27:19 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48RtpZ2QqVz3wm5; Tue, 25 Feb 2020 22:27:17 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 0A23E8D4A50A; Tue, 25 Feb 2020 22:27:10 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id F0EE7E707B8; Tue, 25 Feb 2020 22:27:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 0Q9PaePDLTCF; Tue, 25 Feb 2020 22:27:08 +0000 (UTC) Received: from [169.254.231.217] (unknown [IPv6:fde9:577b:c1a9:4902:2d3b:64e6:77c7:a70]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 6A60BE707B5; Tue, 25 Feb 2020 22:27:08 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Hiroki Sato" Cc: micchie.gml@gmail.com, hackers@freebsd.org Subject: Re: Slow PXE boot Date: Tue, 25 Feb 2020 22:27:06 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: <79AD3725-FDCC-4045-A620-EDB25D88FA65@lists.zabbadoz.net> In-Reply-To: <15F7FD1E-3957-4D9E-922F-394D50445BA8@lists.zabbadoz.net> References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> <20200226.055717.1795667435522458112.hrs@FreeBSD.org> <15F7FD1E-3957-4D9E-922F-394D50445BA8@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48RtpZ2QqVz3wm5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2a01:4f8:13b:39f::9f:25 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-4.84 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:39f::9f:25]; IP_SCORE(-2.54)[ip: (-8.58), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zabbadoz.net]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; FREEMAIL_CC(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 22:27:20 -0000 On 25 Feb 2020, at 21:02, Bjoern A. Zeeb wrote: > On 25 Feb 2020, at 20:57, Hiroki Sato wrote: > > Hi, > >> Michio Honda wrote >> in >> : >> >> mi> Hi, >> mi> >> mi> I had a similar problem before, and the solution was the use of >> pxeboot >> mi> file taken from FreeBSD 10 as suggested by Hiroki. >> >> I could not reproduce this by using my boxes after all, but >> replacing >> pxeboot with the older one was useful to gain the normal speed at >> that time probably because of difference between new (11 or later) >> loader's nfs client and the old one. It was a problem sending a lot >> of duplicated packets for some reason, not just a matter of the >> buffer size. And the server side was Linux. >> >> Have anyone else also experienced this kind of very slow PXE >> booting? >> It may be specific to using a Linux NFS server. > > I see it on zoo all day long for ages. I’ll go back and try an old > pxeboot; if that really speeds things up massively I might even be > willing to debug this a bit more. I found a pxeboot from FreeBSD 7 and while it did not entirely work the kernel was loaded in seconds rather than minutes (felt). I guess it’s time to dig into the changes from back then.. /bz From owner-freebsd-hackers@freebsd.org Tue Feb 25 22:58:23 2020 Return-Path: Delivered-To: freebsd-hackers@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 112EA24314D for ; Tue, 25 Feb 2020 22:58:22 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48RvVQ0YJjz4H52 for ; Tue, 25 Feb 2020 22:58:22 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 8E7D024314C; Tue, 25 Feb 2020 22:58:21 +0000 (UTC) Delivered-To: hackers@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 8DF4E24314B for ; Tue, 25 Feb 2020 22:58:21 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (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 48RvVL6VhDz4H1X; Tue, 25 Feb 2020 22:58:18 +0000 (UTC) (envelope-from micchie.gml@gmail.com) Received: by mail-il1-x135.google.com with SMTP id s85so645523ill.11; Tue, 25 Feb 2020 14:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S4KDV9T5l+YCnDiQSWUHxZrQfK4ai7B2GLW0vabAnGo=; b=Jl4zs6HYrvZz2kiZrjMG54pQTUbJYHPZ+HmcXF9eCU0KUYgxMDA9Z/1Ib+c3FJNTRu +ltBm4geYfaTWh/wTa2DffcZ0T8kcaTwda4jA5KhwLmR8JC2qgT/p3uoZi20ZWCk5Aj/ uzo51dophi4ejCaPhVk3dYNp40auj9Lv6wQQ1gnyO58HMvVX5fJki7HAKpT5+AkQbpfF YfYrVY7mgqijM1YhkEcDSiLad+SJRoaKIyCHiZ5FExnGcV6nMxeZQEH0vqOMCABmA5d+ 0fMrFcK3OX0fYHcacVJfaCfGALfJG9ExXsdv0/Wsjc2rcw0B0nY7Y/r8qp55wt4rjTHc 1FAw== 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=S4KDV9T5l+YCnDiQSWUHxZrQfK4ai7B2GLW0vabAnGo=; b=YkzY6OXqbCI9KiJg1O99nwuuNxK47B13FU80pkP0dianZI38PXDKE/Wr0TV+3HXNnz kP0LpKOduKTWCwXp31pTlEAcDpWCZOstzeyYReSQgwRLg6f5vycYIn2lgdnrTJNNC9QV 6kKlRezPtfLBA8DQZB1FsSzRi6ckjAoburjt/VKABy5m9BFWTgYYJS4TWBX+4GBaZz8n fdHMHft+fi12iUlWFtn/kFGJfugAD/G2YuCtz9JVrqvCZZl89L+jRsSYNhWszntrRM2C LOQW7F6LnB7JuUKWp9XLZN/uQfOi/TaFF2IoN+/9xqsQ9rPynPOwg0L0LUGthZIH6vY1 vYfQ== X-Gm-Message-State: APjAAAUMaN4qN2O5I+vIZT+u78CWFI+GfP2zDxrIGDSg+HEG7unkjEfP QH+vDyCDV7gjqtcel6LOt5wBgFiZ0MQweNw7WiQ= X-Google-Smtp-Source: APXvYqzvvLIovNZdpZQyObWfW+Uipz/qVJ3fsgd/LpE0XIBoX19XjmG0CGUK5i8k/haFCaI8zrwlrauDy6GBsr3yexE= X-Received: by 2002:a92:50f:: with SMTP id q15mr1081869ile.47.1582671497010; Tue, 25 Feb 2020 14:58:17 -0800 (PST) MIME-Version: 1.0 References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> <20200226.055717.1795667435522458112.hrs@FreeBSD.org> <15F7FD1E-3957-4D9E-922F-394D50445BA8@lists.zabbadoz.net> <79AD3725-FDCC-4045-A620-EDB25D88FA65@lists.zabbadoz.net> In-Reply-To: <79AD3725-FDCC-4045-A620-EDB25D88FA65@lists.zabbadoz.net> From: Michio Honda Date: Tue, 25 Feb 2020 22:58:55 +0000 Message-ID: Subject: Re: Slow PXE boot To: "Bjoern A. Zeeb" Cc: Hiroki Sato , hackers@freebsd.org X-Rspamd-Queue-Id: 48RvVL6VhDz4H1X X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Jl4zs6HY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of micchiegml@gmail.com designates 2607:f8b0:4864:20::135 as permitted sender) smtp.mailfrom=micchiegml@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[5.3.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (-8.28), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 22:58:23 -0000 My case was also from Linux server:) Cheers, - Michio On Tue, 25 Feb 2020, 22:27 Bjoern A. Zeeb, wrote: > On 25 Feb 2020, at 21:02, Bjoern A. Zeeb wrote: > > > On 25 Feb 2020, at 20:57, Hiroki Sato wrote: > > > > Hi, > > > >> Michio Honda wrote > >> in > >> : > >> > >> mi> Hi, > >> mi> > >> mi> I had a similar problem before, and the solution was the use of > >> pxeboot > >> mi> file taken from FreeBSD 10 as suggested by Hiroki. > >> > >> I could not reproduce this by using my boxes after all, but > >> replacing > >> pxeboot with the older one was useful to gain the normal speed at > >> that time probably because of difference between new (11 or later) > >> loader's nfs client and the old one. It was a problem sending a lot > >> of duplicated packets for some reason, not just a matter of the > >> buffer size. And the server side was Linux. > >> > >> Have anyone else also experienced this kind of very slow PXE > >> booting? > >> It may be specific to using a Linux NFS server. > > > > I see it on zoo all day long for ages. I=E2=80=99ll go back and try an= old > > pxeboot; if that really speeds things up massively I might even be > > willing to debug this a bit more. > > I found a pxeboot from FreeBSD 7 and while it did not entirely work the > kernel was loaded in seconds rather than minutes (felt). > > I guess it=E2=80=99s time to dig into the changes from back then.. > > /bz > From owner-freebsd-hackers@freebsd.org Tue Feb 25 22:59:11 2020 Return-Path: Delivered-To: freebsd-hackers@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 BDCA42431F6 for ; Tue, 25 Feb 2020 22:59:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48RvWL19Cnz4J6d for ; Tue, 25 Feb 2020 22:59:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 066232431F0; Tue, 25 Feb 2020 22:59:10 +0000 (UTC) Delivered-To: hackers@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 059182431EF for ; Tue, 25 Feb 2020 22:59:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 48RvWH1V35z4J3c; Tue, 25 Feb 2020 22:59:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x341.google.com with SMTP id t14so996124wmi.5; Tue, 25 Feb 2020 14:59:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ShEHJrB19w7wQz5DKMuVX2ZnohFqgyxDhngbBMAsXLk=; b=HrditgUC9Wbn6e0PredZcIpriC2YbkN0P/JVSkxgu8U2EFvn3OxmCLa8DyC03a8PT2 pnFr0ap7FXABky//PT+olFzpd1TPxxGPiK8gyYADlQVbAq/oyCkYdlgumfw7o8SN7mcv lgnGc1b2UX/rUPKSkf5Jllr26EwarwolibH6046m2/8IuCuhUgvSMGqXDyKnZvvYT5SC 40R7vloW+3ZY0iUFKNbXqV415q/l/KjadERdQqL9iZ37cCK9obJxhGRMoNb0ltxs9dt6 O+rKmgyDjN3FTjmoe1VaPe8q5QbYkZdYrM0qJCcaqy0uTpdayhDsotqqlyXs5TziUuto DtPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ShEHJrB19w7wQz5DKMuVX2ZnohFqgyxDhngbBMAsXLk=; b=LW0kWOUh3MauNd48UE1K6kJFc5fEl9ZPrzK0CqN4m5LMsxQPXrcDk03gCcMwfCfLDP L/hNMiqJNZvVyb/Z+BotiOVfaiPEotH3lWL5HxMj4o08xrACRa7z9pzBV9gEInDuLies KDsVSHT5NlmDszzuSttkxoMWKyjHYoD2szS8hU97VxB7Uh8uX15hLUlsZuiQFwYmGZON 5jaAkVsuu3bIwL9IvYrfKKa4P/iEdxO5W2KFaY7Zbioy2yN0J93650NM+UaJFE5K+CuM DCom+m/oIwZJHZuzMpIX96JrEMTIml6C0pOx696cUFSAOADSGrZy0nbXncgJMEW44/am JYtQ== X-Gm-Message-State: APjAAAV+nOJveFaWXRUBwhcYzyEWXDwvdtNbguTpOeAZOEetsC3hcd7z VQyq9P6QQd2HVuOAVehemZ87FNNDnLrLNSxi+fHzfQ== X-Google-Smtp-Source: APXvYqzqWa4ZvuJHIA0SXJUWTcvngUg/aCSIbRqSjax8794kVqRDKF9AHMKvQoewTGra82+zHqcWU1TIO5thvQn4JWk= X-Received: by 2002:a1c:e483:: with SMTP id b125mr1425859wmh.187.1582671545294; Tue, 25 Feb 2020 14:59:05 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:6b02:0:0:0:0:0 with HTTP; Tue, 25 Feb 2020 14:59:04 -0800 (PST) In-Reply-To: <79AD3725-FDCC-4045-A620-EDB25D88FA65@lists.zabbadoz.net> References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> <20200226.055717.1795667435522458112.hrs@FreeBSD.org> <15F7FD1E-3957-4D9E-922F-394D50445BA8@lists.zabbadoz.net> <79AD3725-FDCC-4045-A620-EDB25D88FA65@lists.zabbadoz.net> From: Mateusz Guzik Date: Tue, 25 Feb 2020 23:59:04 +0100 Message-ID: Subject: Re: Slow PXE boot To: "Bjoern A. Zeeb" Cc: Hiroki Sato , micchie.gml@gmail.com, hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48RvWH1V35z4J3c X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=HrditgUC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::341 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[1.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (2.74), ipnet: 2a00:1450::/32(-2.41), asn: 15169(-1.67), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 22:59:11 -0000 If memory serves the slowdown occured past the rewrite, so bisecting wont get you far. I don't know what the difference is internally though. On 2/25/20, Bjoern A. Zeeb wrote: > On 25 Feb 2020, at 21:02, Bjoern A. Zeeb wrote: > >> On 25 Feb 2020, at 20:57, Hiroki Sato wrote: >> >> Hi, >> >>> Michio Honda wrote >>> in >>> : >>> >>> mi> Hi, >>> mi> >>> mi> I had a similar problem before, and the solution was the use of >>> pxeboot >>> mi> file taken from FreeBSD 10 as suggested by Hiroki. >>> >>> I could not reproduce this by using my boxes after all, but >>> replacing >>> pxeboot with the older one was useful to gain the normal speed at >>> that time probably because of difference between new (11 or later) >>> loader's nfs client and the old one. It was a problem sending a lot >>> of duplicated packets for some reason, not just a matter of the >>> buffer size. And the server side was Linux. >>> >>> Have anyone else also experienced this kind of very slow PXE >>> booting? >>> It may be specific to using a Linux NFS server. >> >> I see it on zoo all day long for ages. I=E2=80=99ll go back and try an = old >> pxeboot; if that really speeds things up massively I might even be >> willing to debug this a bit more. > > I found a pxeboot from FreeBSD 7 and while it did not entirely work the > kernel was loaded in seconds rather than minutes (felt). > > I guess it=E2=80=99s time to dig into the changes from back then.. > > /bz > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > --=20 Mateusz Guzik From owner-freebsd-hackers@freebsd.org Wed Feb 26 01:43:13 2020 Return-Path: Delivered-To: freebsd-hackers@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 D0947247766 for ; Wed, 26 Feb 2020 01:43:13 +0000 (UTC) (envelope-from jonathan@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48Rz8d4chgz42fD for ; Wed, 26 Feb 2020 01:43:13 +0000 (UTC) (envelope-from jonathan@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 517FC247765; Wed, 26 Feb 2020 01:43:13 +0000 (UTC) Delivered-To: hackers@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 50C18247764 for ; Wed, 26 Feb 2020 01:43:13 +0000 (UTC) (envelope-from jonathan@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Rz8c6xL8z42cq; Wed, 26 Feb 2020 01:43:12 +0000 (UTC) (envelope-from jonathan@freebsd.org) Received: from [192.168.42.160] (CPE00fc8db75533-CM00fc8db75530.cpe.net.cable.rogers.com [174.117.179.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jonathan) by smtp.freebsd.org (Postfix) with ESMTPSA id 321504707; Wed, 26 Feb 2020 01:43:12 +0000 (UTC) (envelope-from jonathan@freebsd.org) From: "Jonathan Anderson" To: "Hiroki Sato" Cc: hackers@freebsd.org, micchie.gml@gmail.com Subject: Re: Slow PXE boot Date: Tue, 25 Feb 2020 21:58:38 -0330 X-Mailer: MailMate (1.13.1r5671) Message-ID: In-Reply-To: <20200226.055717.1795667435522458112.hrs@FreeBSD.org> References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> <20200226.055717.1795667435522458112.hrs@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_32E2BE2F-D437-4F1B-8192-EF362A6B1AA1_="; micalg=pgp-sha1; protocol="application/pgp-signature" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 01:43:13 -0000 This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_32E2BE2F-D437-4F1B-8192-EF362A6B1AA1_= Content-Type: text/plain; charset="UTF-8"; markup=markdown Content-Transfer-Encoding: quoted-printable On 25 Feb 2020, at 17:27, Hiroki Sato wrote: > [...] And the server side was Linux. > > Have anyone else also experienced this kind of very slow PXE booting? > It may be specific to using a Linux NFS server. I experience very slow PXE loading from a FreeBSD TFTP/NFS server, especi= ally when UEFI is involved. I=E2=80=99d be happy to run tests and otherwi= se gather data. Jon -- = jonathan@FreeBSD.org --=_MailMate_32E2BE2F-D437-4F1B-8192-EF362A6B1AA1_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQFJBAEBAgAzFiEEVjsgwb+/9jhhD8WEsRs4BJwO4BAFAl5VycYVHGpvbmF0aGFu QGZyZWVic2Qub3JnAAoJELEbOAScDuAQRkkH+gIlDm1ovcLdRx9AEARljATe6mym tAfJKOOLK21jq5uKcXZ6h7G6D4MHOafFU04pqtjBuJ1KjwTH4e8acINuWHTRIPDq Q9oRWW+LN3CdX562OgTQ043ytcz37m/6zKTfm5A+s6oKKjexSoKjON6NoFitaly9 aPEYiatfdcWJCtET555eu/9fTZlvIocUErEX7BBTexViEcfiXwfh0wPLNBM7yHpe iGaQ97Nm4mNbRTSHzKYD4KO0qrCpxOvOWvzyvqboRBitwVAkLBHqzCmdBhsSMdRC +qCBoCmY2NaSa74e46MTP8mIdCLJAzLswaOf39n2uA5NF6W/DRfHs6p5npI= =bnnJ -----END PGP SIGNATURE----- --=_MailMate_32E2BE2F-D437-4F1B-8192-EF362A6B1AA1_=-- From owner-freebsd-hackers@freebsd.org Wed Feb 26 02:46:24 2020 Return-Path: Delivered-To: freebsd-hackers@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 152EE248B15 for ; Wed, 26 Feb 2020 02:46:24 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48S0YW3wkWz48vB for ; Wed, 26 Feb 2020 02:46:23 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: by mailman.nyi.freebsd.org (Postfix) id 67D9E248B14; Wed, 26 Feb 2020 02:46:23 +0000 (UTC) Delivered-To: hackers@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 65995248B12 for ; Wed, 26 Feb 2020 02:46:23 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.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 48S0YW19Cwz48tp; Wed, 26 Feb 2020 02:46:22 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 01Q2kJNl000503; Tue, 25 Feb 2020 18:46:19 -0800 (PST) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 01Q2kJQl000502; Tue, 25 Feb 2020 18:46:19 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202002260246.01Q2kJQl000502@gndrsh.dnsmgr.net> Subject: Re: Slow PXE boot In-Reply-To: To: Jonathan Anderson Date: Tue, 25 Feb 2020 18:46:19 -0800 (PST) CC: Hiroki Sato , micchie.gml@gmail.com, hackers@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-Rspamd-Queue-Id: 48S0YW19Cwz48tp X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; TAGGED_RCPT(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 02:46:24 -0000 > On 25 Feb 2020, at 17:27, Hiroki Sato wrote: > > > [...] And the server side was Linux. > > > > Have anyone else also experienced this kind of very slow PXE booting? > > It may be specific to using a Linux NFS server. > > I experience very slow PXE loading from a FreeBSD TFTP/NFS server, especially when UEFI is involved. I?d be happy to run tests and otherwise gather data. I have seen this before as well, I tried to debug it, then some changes someplace suddently made it disappear and I was unable to duplicate it. Note I also use a very sacred pxeboot image from a 11.x system I saved that just works for me. I boot systems with a native pxe rom, they are handed my custom built more complete pxe that understands nfs and http. I then boot our loader and kernel via nfs. The only thing I do over tftp is to hand out my customer version of the pxe code and my menu.pxe file. > Jon > -- > jonathan@FreeBSD.org -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-hackers@freebsd.org Wed Feb 26 06:45:48 2020 Return-Path: Delivered-To: freebsd-hackers@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 6E74224E365; Wed, 26 Feb 2020 06:45:48 +0000 (UTC) (envelope-from babupalit@gmail.com) Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (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 48S5sk3M9fz3Hms; Wed, 26 Feb 2020 06:45:46 +0000 (UTC) (envelope-from babupalit@gmail.com) Received: by mail-oi1-x241.google.com with SMTP id q81so2018595oig.0; Tue, 25 Feb 2020 22:45:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SfN7kmW5vQGwFT6YDq8c+tKesMlItz1oVGpb3hZhW+I=; b=OPtwSHPJVjipis5cQ5QOYXRDBxugn4ctknx7epnIKeYk/HFfFDlHA24f8XMt4enJxr gKYqFBfLhOAqRM5JomEPKC1jooGR1vKBQC0LMv2CwJooeUB6EH8QO0TAH95FWtaIE5js SrcHonPPeoiJSVqomv6Z60qljus5gX+mX+MmVzzU1+DC6KxW+uVbiubTTi07triJc0jH goO3qNJuZILODmTqANrRRcOcrDaFn6ca6cbz27SbE+ptjwmWyK72YgQXEQ0Y/WHXtkmv RGPCSb3FcRQuBgMNq/yKxBDlwyasb7tqbhqte5fQKLsJck6m8UqGc3oGNOiraHe9PtXz t09Q== 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=SfN7kmW5vQGwFT6YDq8c+tKesMlItz1oVGpb3hZhW+I=; b=PawBS5ZcCMBA7N2jrxS6jJEDZtNGa2F0oOgaFj+8YfEWtFNtEa2oicGNQ2viZX6eXk pzdGKRmWQhS3e1FaB210tTh9FLCjIIj5+nvCQxQiqZZYqb/76fothQ0FX/q19Tb2JyEo uI3hnTy48JsmUknOytNuOgbHt0UzBZEEyQJ215Zldbrs6tmbLTlLK2zziy7uHxe20rDF Jro+juLJtACah2e23mz5pEWmNNA+Qi+CXsUmkjVCbWbGYUMNgJO/P7ZNJfN9wlCBBg91 7H63UPQ0R16RXEyzs9Ofynigs4Wk50b9+Jte67jVLjShrv1l8j3I9DdZvrIeiGNREPV2 yosw== X-Gm-Message-State: APjAAAXKuFnjnUvJweySEdPAjURzm41HSxaSlpmQbvoFl97Gvur73PyY gl7eijwcmyAFTg1Ss9TvvzaAsqo3kEm6uHR+XlLCbQ== X-Google-Smtp-Source: APXvYqzOP/bPihUs2b0FKkWGOw39v+cUws0b8X3HQeuH4R0Y61eAKO4bfZWU+YQE0OnOk30709/s8ISN5f5OCTem7IE= X-Received: by 2002:aca:bb54:: with SMTP id l81mr1831238oif.175.1582699544834; Tue, 25 Feb 2020 22:45:44 -0800 (PST) MIME-Version: 1.0 References: <890a299c074fc83a02911583531d686257924be8.camel@freebsd.org> <08fd4dcf7231237abf749834d6bce006892eac26.camel@freebsd.org> In-Reply-To: <08fd4dcf7231237abf749834d6bce006892eac26.camel@freebsd.org> From: Arpan Palit Date: Wed, 26 Feb 2020 12:15:33 +0530 Message-ID: Subject: Re: msleep_spin is failed to waken up even after wakeup routine is invoked for the same. To: Ian Lepore Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org X-Rspamd-Queue-Id: 48S5sk3M9fz3Hms X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=OPtwSHPJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of babupalit@gmail.com designates 2607:f8b0:4864:20::241 as permitted sender) smtp.mailfrom=babupalit@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[3]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (2.14), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[1.4.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 06:45:48 -0000 Thanks for the clarification Ian. The issue is not happening now. I have ran the test for more than 1000 iterations multiple times now, but looks like some device specific internal issue has come up, working on it. If I need any more help in future, I hope I can ask you again. Thanks again for the quick response. -Arpan On Mon, Feb 24, 2020 at 1:18 AM Ian Lepore wrote: > On Sun, 2020-02-23 at 12:30 +0530, Arpan Palit wrote: > > Thanks for replying Ian. > > > > The code is similar to the fix structure code as you have mentioned > above. > > > > Its happening after running the test for 5 to 10 iterations, out of 2k > > posted command to the hardware only 1 or 2 of them are failing to wake > > up properly. mutex lock has been properly introduced in both > > wait_for_completion code & interrupt handler part and also the doneflag > is > > getting set from the interrupt context properly. > > > > I am running 16 thread of 2k command simultaneously. > > > > I have verified that from the hardware side the command completion is > > proper, its failing in waking up the sleep in software side. > > > > So I am suspecting some issue with the scheduler which failed to wake up > > the sleep in this case. > > > > Below is the current code structure: > > > > /* Wait for Completion */ > > mtx_lock(cmd_comp_lock); > > completion = false; > > ret = execute_cmd(cmd); > > if (ret == 0) { > > while ( !completion && err == 0) > > err = msleep(cmd, cmd_comp_lock, PCATCH, "cmd_xfer", hz); > > } > > mtx_unlock(cmd_comp_lock); > > > > /* Interrupt handler */ > > mtx_lock_spin(cmd_lock); > > *//Disable inerrupt > > *// error checks > > completion = true; > > wakeup_one(cmd); > > mtx_unlock_spin(cmd_lock); > > *//Enable interrupt > > > > That shows two different mutexes being used, which violates the safe > pattern for doing conditional wakeups. The same mutex that protects > the setting of the 'completion' variable in the interrupt handler must > be used to protect the clearing and testing of that variable in the > mainline code, to avoid missed wakeups. That means using msleep_spin() > with cmd_lock in the mainline code. > > -- Ian > > > > > On Wed, Feb 19, 2020 at 8:12 PM Ian Lepore wrote: > > > > > On Wed, 2020-02-19 at 14:13 +0530, Arpan Palit wrote: > > > > Hi, > > > > > > > > I am facing one issue where wakeup rountine call is unable to > > > > waken up a > > > > msleep_spin routine call with a timeout value of 10 Seconds. > > > > > > > > The real scenario is as follows: post a hardware command and > > > > sleep using > > > > msleep_spin routine till interrupt comes, After getting the > > > > interrupt > > > > > > waken > > > > up the sleeping process using wakeup_one/wakeup routine call. As > > > > there > > > > > > are > > > > more than 2048 command and 16 parallel threads are running, > > > > observed randomly *one or two of the posted command* is *timing > > > > out* for > > > > which the *interrupt has came and also wakeup routine is invoked > > > > *after > > > > getting the interrupt for the same command. > > > > > > > > Note: > > > > *The issue is not seen when number of commands are less than 2048 > > > > with > > > > timeout of 10 seconds. > > > > *The issue can be seen with less number of commands also when > > > > timeout > > > > > > value > > > > 1 second. > > > > > > > > Can anyone please provide me an optimized way to schedule the > > > > process or > > > > > > a > > > > better way to do the scheduling. > > > > > > > > Thanks, > > > > Arpan Palit > > > > > > > > > > Is there any chance this is the classic "missed wakeup" scenario, > > > where > > > the wakeup happens before the thread enters msleep_spin()? That > > > can > > > happen with code structured like > > > > > > enqueue_request(req); > > > err = msleep_spin(req, etc); > > > /* Handle done req or timeout */ > > > > > > and a fix is to structure the code using the same idiom required > > > for > > > pthread_cond_wait() in userland, something like: > > > > > > req->doneflag = false; > > > enqueue_request(req); > > > while (!req->doneflag && err == 0) > > > err = msleep_spin(req, etc); > > > /* Handle done req or timeout */ > > > > > > and of course on the interrupt handler side you need something like > > > > > > /* lock mutex, do hardware stuff */ > > > req->doneflag = true; > > > wakeup(req); > > > /* unlock mutex */ > > > > > > -- Ian > > > > > > > > > > > > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > > freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@freebsd.org Wed Feb 26 12:31:11 2020 Return-Path: Delivered-To: freebsd-hackers@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 6BEA9256DE8 for ; Wed, 26 Feb 2020 12:31:11 +0000 (UTC) (envelope-from amitkumarrathore07@gmail.com) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (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 48SFXF4fZXz4Lkk for ; Wed, 26 Feb 2020 12:31:09 +0000 (UTC) (envelope-from amitkumarrathore07@gmail.com) Received: by mail-qv1-xf32.google.com with SMTP id p2so1183780qvo.10 for ; Wed, 26 Feb 2020 04:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=NxEQom3MBJxGKYEuqhAiZ0rigi5+JbP2p9eboBOWXXk=; b=BrHz29X0ufkUd4KThr9M8NSbQZhY0wVwkUqVoQSEobxsu/TwNBFhClQWnMqnRcR979 ttp/iyPpX8La1zfKVlUx77V7nw2Bh7fa2NzlzX/joMThR8Tf8/eCbiQKJCpyxzgy3rIV XgwPhnm52pOkKehYiCdSiGqxJnl+hCubw8CI+SE+jmOdrKHSQV6aIOfD8mb93x4jVY3G 8nvG8lYcasuLiiBGtBRv+3X7gdAdktTA+QGmifmdnf0q5e8twpzdZSlpHtvSgzgjIdSd RAaxAL+EuBOeosHMd7gCF62RZd1TAA4DLuw4SOkDGnay3IOo7FPXaPsswJSncDtpWfdG 5eRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NxEQom3MBJxGKYEuqhAiZ0rigi5+JbP2p9eboBOWXXk=; b=MB55/ZtMcx2MsC7hXi71gPE71zA3ff0u9SK2zz5UcDOL4hSEv7tyZ67QY1sX+QRJ+f z4RuV8lRt2JYlGdLj6sbIz8L9bb3tfxnXIVAByA+B4Bo0h/TD2k4kzA0V730dTLLsiup BeLcdsq2WgKr9jX8VcCWtgsiSPxxjKSwLCmQN6ExuMHC15iosLzwggwwTtbvpNTGzwPx oUDsZF3cTC2D6h/onLfkQDc4JwCFguAKjFwrw1swllSpTOYn5fuyWEUZ38enTu5B04ta T2q8CMMvp3XqcS1dhwcDZUnL9GqsLLRG+rp1rF30ZwvwZ9ccBKwZFMJWdS9wxbAc3Fo/ 3Wzg== X-Gm-Message-State: APjAAAXzuJ3wnj4V6H8/Bz0/0dwC9eygexAu3aWy1FvqNCc3Z9zCIM3I 0eKsuxLNaTsGfLF95Tzm6jk9TRADUE0NnyYvXSse/Igonps= X-Google-Smtp-Source: APXvYqyMw0QJmdr+o4upAv/hjXkekYDuoa5ucEOD04GGyAC8G3T1IhkdQY96zCbD8r7kInmwuRdkGCldwdYupPC0r8k= X-Received: by 2002:a05:6214:1050:: with SMTP id l16mr4480905qvr.25.1582720263289; Wed, 26 Feb 2020 04:31:03 -0800 (PST) MIME-Version: 1.0 From: Amit Kumar Rathore Date: Wed, 26 Feb 2020 18:00:39 +0530 Message-ID: Subject: Regarding work on FreeBSD project. To: freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 48SFXF4fZXz4Lkk X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=BrHz29X0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of amitkumarrathore07@gmail.com designates 2607:f8b0:4864:20::f32 as permitted sender) smtp.mailfrom=amitkumarrathore07@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(0.00)[ip: (-8.33), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 12:31:11 -0000 Hi , myself Amit kumar i want to work on project idea Verification of bhyve's instruction emulation. So please let me know about further process. Thank you Amit kumar From owner-freebsd-hackers@freebsd.org Wed Feb 26 19:46:03 2020 Return-Path: Delivered-To: freebsd-hackers@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 8CB9F242675 for ; Wed, 26 Feb 2020 19:46:03 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (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 48SRB1333Mz4g6d for ; Wed, 26 Feb 2020 19:46:01 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id 01QJjvfV034069 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 26 Feb 2020 20:45:57 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1582746357; bh=4ZrXTsVdU/cJgAP/7xmnzkSt9OsTAiPQ3OM3mR0m3yU=; h=Date:From:To:Subject; b=KhFYTo0CdrACouA2UguuUiVUom1fvn0FCC1sVTN5y35BYPZHSDUwSA94a4rJuDrFh p+GxXMUGKGbwsd6+wuLHeR6oL0eoHINGfSmbFO4Osj91kmbe8gu1ELpvqB6GbuvKEz f6hRCu6CLwmlyyhWHWq6MgDvwwIuvmhKN+auTaGc= Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id 01QJjvpb034065 for ; Wed, 26 Feb 2020 20:45:57 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) Date: Wed, 26 Feb 2020 20:45:57 +0100 (CET) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Subject: FreeBSD raspberry pi C compiler strangeness Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Rspamd-Queue-Id: 48SRB1333Mz4g6d X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=fail (rsa verify failed) header.d=puchar.net header.s=default header.b=KhFYTo0C; dmarc=none; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-3.86 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_REJECT(1.00)[puchar.net:s=default]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DMARC_NA(0.00)[puchar.net]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[puchar.net:-]; RCVD_IN_DNSWL_NONE(0.00)[90.144.1.194.list.dnswl.org : 127.0.10.0]; IP_SCORE(-2.56)[ip: (-6.78), ipnet: 194.1.144.0/24(-3.39), asn: 43476(-2.71), country: PL(0.06)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:46:03 -0000 i wrote my program and tested completely my program on x64 laptop under FreeBSD 11 then i compiled this program under FreeBSD on raspberry pi (quite latest version downloaded less than 2 months ago). And program didn't work properly. Finally i found a problem. char is signed by default on x64. On raspberry pi char is unsigned by default. replacing "char" with "signed char" fixed problem completely. Why char is unsigned on FreeBSD/raspberry pi? From owner-freebsd-hackers@freebsd.org Wed Feb 26 19:52:47 2020 Return-Path: Delivered-To: freebsd-hackers@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 A942C242A0C for ; Wed, 26 Feb 2020 19:52:47 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from mailhost.m5p.com (mailhost.m5p.com [74.104.188.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "m5p.com", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48SRKp0w5bz3Dpx for ; Wed, 26 Feb 2020 19:52:45 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from [IPv6:2001:470:1f07:15ff::26] (court.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:26]) (authenticated bits=0) by mailhost.m5p.com (8.15.2/8.15.2) with ESMTPSA id 01QJqSxJ012608 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 26 Feb 2020 14:52:35 -0500 (EST) (envelope-from george+freebsd@m5p.com) Subject: Re: FreeBSD raspberry pi C compiler strangeness To: freebsd-hackers@freebsd.org References: From: George Mitchell Autocrypt: addr=george+freebsd@m5p.com; prefer-encrypt=mutual; keydata= mQINBFgnLnwBEADAJDiBKQX77LFRz9wZW8mz3KvaQol2nIremcws0F1mz/zgFlk6uhQVtwnL wb4XL5LdFwcNE1+QZzPLcbYWoWQlz0lBw1bMuKAgr0S6V2e0+I0DqhKeslVFctcTwtvT6pnK VLZXO/7ZGAaLzG4K5vSPzgoevU+YI/pxNsVCH2UO/c3jQW63uEt25mIZbCF1Pu4jgp4RhIgF ujn877r/j6OwBwjzRUu3E6ADp+U825d+5YCuQMEH0wIPnn9GTpXvfdKdbwOIl2akqXqs4cnk iATWfK3r6D4mvDEj1OPHlTvJYcfic7aOIiAwmx1C1v78GjXOdOOA0SGffNix3C2/8oZUO1+V Aet4MKpUKkduWSvULhIkHNZ5Nu8SIJOqge8pmtHxuNXAMfMrAjMdjPwwBFLsYg3Xa2E2oJwg ehTauwd/EDJFcVCyDCyCAYOi/BH/+XQyxzgDlY9N9qj9tHqhVPI6XK7t8UVffGiZUq4rHp5J RdOToqiTNC6eCJBczhMIW+DuFvWU9e6W708T1dz0Accn6Lrgk4eRIn3GFPBG+TxnpjAqHsbW 607dcnD3YKAqY4e+khczL4EObhe7dC1v2fmZiAC6Ds3WHR11IfqoUgCkIwJ590Ej+ElygJFF XxI82wtEz9hkeLLvItpyEJNVjppViRW+Dgl/U7ypHB3qDgYjgwARAQABtChHZW9yZ2UgTWl0 Y2hlbGwgPGdlb3JnZStmcmVlYnNkQG01cC5jb20+iQJUBBMBCAA+FiEENdM4ZHktsJW5kKZX wRES3m+p4fkFAlhZcR0CGyMFCQlmAYAFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQwRES 3m+p4flqmw/9Emr/ydTG2n9o/IX1yVCNcHVFenVrcOY0L+DGQYZRO/XpLvsGYcuSIQId1w7h l4HZKI89ri2fF2ks6upMqBajLf8s7a8PnYrbw5bPaoOFyNTjv57GLZVsYw95kmMUpK6siuAA fXvHfKUpC/sThbwSv/1CLryVG74+5vdI8j7cQeDM436FThxlVfHKrILIiL34D4WThFB3hV/Y 2A+mQwXmdLcuQXXeAazqsFJL8sgEKSC7GMcExDkVpGc5Rh2hu97a4Sa7qWX9G/YdZOrcDacJ XxfvePn3m3WfRtXN/r0lUfiVXiqkFfbvqSaZQ0I4UvZXNGd/gH4jKHtX9RTH9G96UZeHNoMo tPw9U0fx8Ceh72nUL9qzqnmok/ryWm+6gt4Q1eRP7QAosOa1g/RgUdS1Z9IuCmbXMDp5kbNw L4ZoDMF5U3mmh8/IOKkhGopNLbNv0mwUgC59pnCptiOVx8DyckXWC4L2r6PKbWGrcGIzsUER 9smfL10gpp5H5agjwwPZI6/kzJ0R5nBzQWAlwqI73YAy6JI0HTD6lvxW7yWm2fGjEfmyaBOU 8OLUin7auoFSn+QmD5yNCUn5Ls77qHARkT1ZGocAnQkvZBGTwXpvyJixygXsm+vSUFDYBOSn cR54vdXOEMqrJk6SGau5YI9V7EhQVveE1BUp8ofWf2oo4RG5Ag0EWCcufAEQALuTOxmqMFE+ ieev/rcL3wVJrcuKS+pBbKCY9IIL0OwVf98HQJJcgdOsdDhruVd19nJNlwZ3Fc34wLw7y2GO 9WrpZiYKnI4n9urhLE5r1ydBInlI/1UKZWgM3/dPjJtcXMsC3vnqR9DmOxW4/SbqJDjP3XzO FleT4yip3AaNhPGwEPTZrubVp5hp/JojaZn690TLRwOFXg8NcjpOEs0Bq9M+OLpmsF0flrgs yDfS7y+SQ17R4Iq9T7RxZvZVAh510yGGIZIETYO/4Dh417VVm+gaksOVh2egetpUUvYYc0Ub KaP+5F/WGNrmRb1F6SKypvLlKkYAHCsUUSzsAGl9gbQhEEpuOMbUKp1979HoRMkW+8046kIo 8BZ6ph8izG/g4dZOaEqKGEhqdhYIB7UwMtFFuPtSs5Nl6JrZYni/nzFtTmtVCgcj9PNqrzqt fNFYhNznD6St6wxp3TOm9D3TQF0dzwBM1jZpb8WvmK3k6oy8hbpjiBzxn3kyRA9Vzy+PdbN/ G5a1k0rpZu/ivpBuLCDVGljUmgQigXg6xkk5UxBoHp7MPvG9prZ5jqdEa2r1KgnGjaq+VJsu Uqrw10dVgeG1NulDU1+sQl+/mwtflbkimhjDDjxsVgfrv7uvV/9be+gGm1KATuqdgCboSb1s QAo5ARfwFfChrnh+fTfPpPKHABEBAAGJAiQEGAEIAA8FAlgnLnwCGwwFCQlmAYAACgkQwRES 3m+p4fno9w/4m+swztkzxSWdutjgSv2mw+PdrKWVGFAUD2HoY1Qpi5LNLE6s9pP3qzwpQYwK viOufVJYWZ540ss6BImZBGJwyHouacqrpZjpRo5+ftj07rY1SNd8QjcHDggPfpgJ1D4Il3Xi vRg5/gzkXnRu8dXeVvMP1Ndk/F5wcoLZlQwFtPfu2xyRYIsveXMoyypAvAFSaAGXU0hRzuDJ fGI3LFvpI9UXU2C4MMzjfyZyD2NJEDKOACTo85QQzxgheTDQaDocXW00wknXFMwEItiXp8dO 2zEml/3Kj4efDfjqGpjNefjK0cnj02Byt7y6GozWXyIylrXu0SN9qWRzUVZH3+q+ijA4q3Gm 9uWzLdpjN4QWAiiaEvMhLPohp9DdLsy3kAWWrA3+pAfHSTZXrobMMbSeBkE9E4/WxdKl0nM7 TNslAWcxkTd/7Ly9cxwT8wFdHuQB1hgCmIQxDNXHL1N1ANTeUYum1w9nUg6e1M0UWu+nk3Cw qL7oL2KZe13mQnU/CFwlhbf+i//j3SXrQLlIVQv9Fn805bxIcVo9yqUZyoiV7EUpvOsxDCZh ej3mNYF5nRCf6trEJQVk0aLC26zJAYExykdUlRqc4I13XPhlt+aFSMMkoL/thYO6e9oNFK6Q aJEKXomzxxqpceJVmPH6zvqJbOboAdE/mOD0PoS1M6saIQ== Message-ID: <4719d54b-d2df-e333-6023-869a3e5a562f@m5p.com> Date: Wed, 26 Feb 2020 14:52:15 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c5O4SWNqSVbk8MPOvcVhKGv4ob2EiyxSS" X-Spam-Status: No, score=0.0 required=10.0 tests=HELO_MISC_IP,HELO_NO_DOMAIN autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mattapan.m5p.com X-Rspamd-Queue-Id: 48SRKp0w5bz3Dpx X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of george@m5p.com designates 74.104.188.4 as permitted sender) smtp.mailfrom=george@m5p.com X-Spamd-Result: default: False [-7.24 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_ATTACHMENT(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_NONE(0.00)[]; IP_SCORE(-2.84)[ip: (-9.87), ipnet: 74.104.0.0/16(-4.94), asn: 701(0.66), country: US(-0.05)]; DMARC_NA(0.00)[m5p.com]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; ASN(0.00)[asn:701, ipnet:74.104.0.0/16, country:US]; TAGGED_FROM(0.00)[freebsd]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:52:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --c5O4SWNqSVbk8MPOvcVhKGv4ob2EiyxSS Content-Type: multipart/mixed; boundary="cXUVnWJFVCYLVeQ23Srf0J5tu9XT06eoR"; protected-headers="v1" From: George Mitchell To: freebsd-hackers@freebsd.org Message-ID: <4719d54b-d2df-e333-6023-869a3e5a562f@m5p.com> Subject: Re: FreeBSD raspberry pi C compiler strangeness References: In-Reply-To: --cXUVnWJFVCYLVeQ23Srf0J5tu9XT06eoR Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2020-02-26 14:45, Wojciech Puchar wrote: > i wrote my program and tested completely my program on x64 laptop under= > FreeBSD 11 >=20 > then i compiled this program under FreeBSD on raspberry pi (quite lates= t > version downloaded less than 2 months ago). >=20 > And program didn't work properly. >=20 > Finally i found a problem. >=20 > char is signed by default on x64. >=20 > On raspberry pi char is unsigned by default. > replacing "char" with "signed char" fixed problem completely. >=20 > Why char is unsigned on FreeBSD/raspberry pi? > [...] Because the C standard explicitly doesn't say. The standard DOES explicitly say that char, signed char, and unsigned char are considered to be three distinct types, no two of which are necessarily comparable. The bottom line is that you are asking for trouble by ever specifying "char" as a type, and you should always specify either "signed char" "unsigned char" as appropriate for the given situation. -- George --cXUVnWJFVCYLVeQ23Srf0J5tu9XT06eoR-- --c5O4SWNqSVbk8MPOvcVhKGv4ob2EiyxSS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEENdM4ZHktsJW5kKZXwRES3m+p4fkFAl5WzG8ACgkQwRES3m+p 4fnb0hAAv/XIEmlxj+rcI+6P5vBmZgiDpDHHt/T5rNsJJ+vETWFR+bWzagwPGbkY LwIrdSpIbK47OuP28VqZHybKhUOCc5P1v+ClTbJhBrKOY5BOBX69plvjhNiocPky tQ9Q+q6M0FzoBHY7xaLRmQF6Io3iRvEtCGTfUCpRTlxbU0T3HEVn/muQwuv1zCO5 zadxdEVRBx85FnFQpa9pkssVXPcEK1TxJNtMuuTYKcFf/NFLB9ICLdRw43aEUA4b fEZXuffmukfBC9uuwga+n1Uw0upOBVVvuD/fLdzkTZ3cSs08Tcm5SmAgYsvlEnVa Mc/ERVc2lZ59fMjXsnDIypi8yoXuZVLiQ6BnaKC5S8KwGLdpSEUdO3vGJxV15MiV 2rKXJ+gQ4J0y4f67aZRNUPZ/E9KChbsWEymepFUPlvfOLeUZffi9VZkKLUOhRnLq qQ419OPWXECLdVwEkhEtJDeOrL0U0DocZ3Sz8At/E49CL9PkoR/96GgQa7jtL7Ax oWWIIhXtCIR1O+xX/3sN5yAhf4PPJYYFu/y5pF3lR6pi/DoBkPDFrtcEcJ/PAFku FMxFeZ2Ogs1eTxonLKxj/3kVfxwCstkGw94gzVW1imMmdmPHDSxNKnXpOfISzFaN QUshly3cATwY+vv7+82gDjT5+dk2Wuedk3Ah68OrQ1fX760+Cpw= =LSIq -----END PGP SIGNATURE----- --c5O4SWNqSVbk8MPOvcVhKGv4ob2EiyxSS-- From owner-freebsd-hackers@freebsd.org Wed Feb 26 19:58:59 2020 Return-Path: Delivered-To: freebsd-hackers@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 4C19724306C for ; Wed, 26 Feb 2020 19:58:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48SRSy3XB3z3R6X for ; Wed, 26 Feb 2020 19:58:58 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1582747135; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=qnEwzmBQ2db0IxzQLGdMTnQ/QD1YxA2CA0F6+t6zLubYdMyVg1YKzxT2qa54265CoReQV7BJkKDCC dGz5BCWNTc+1vICRv4V1PJ7rkBea46r9zwAWc8GlUJKkktoHP20TiiOmLrdlzCYEaxmkndlz7xQQCZ yHqAPDk2HnfMpPbkNQuNnG39gPHqqtawihkUXsLKoh6p5lXfacxvA/Ni9IM06yvN9DyaSq+k1xWDyr ilb7BNHBlXDMmFuXG9XCPVQ/e3cZeJg+FuXkanmbMH0+Q3OxrDJVlXQvEgfdb6/uaNR73yYYqq9o3N +Yu0GBG2OxyS3u6Wa6iTRl1BBysHw8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=1JLm+WGNXb2WHlUlic0mAZ8QASnt2g6K/lprhrIt7gE=; b=p6U/coyU13dsLDMVN8F7tMMSjCX6y9CAKoJTk2ZXBBQDG7wigBO/x+M49QipZt6HC1eD5PjXlfUaY K2Nkfq1vuQEs9Niny1+OxzAUbbOJAXqIF4bvR9zoD4dMCfz5LGFeDblanadN9lSiUv+fw4AJIURgwr 0btEZXu2M/1FJJ4dbUp/vriX5K8BakYoGsUL9mGUo8xGibKl8RFiTifEB1GeYpFMTuF6WLiJoVMRlv aXCJms30otr/9LEC2zwWRDGNQthVBcAiEVLN3j+Q/vKy3yyzZPPDgOToVawOh8pGOgG4UV5Mrq2GTG hwZBn4eyIW/ukaBcWuTFhyxQb6NmCiQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=1JLm+WGNXb2WHlUlic0mAZ8QASnt2g6K/lprhrIt7gE=; b=rtzHX3T3QSyZQvpNpnGw6/xJvY1jaBKOTDHsPfpxYP92PCsUVlWyCf61Zj3lqaGmSjc130xUwqt/D TuQ/e1G2mPwLTEPdnOt75R94un1QvMr5z/g73PuW9qacoDPHyXOwFWutP37EHJuCLr+xnCrvsPoAtm W/K2NcRxnGKKmt3LVPu18HfJ7xp6IKWcUnqT5eqo0UzyYhMJaIceffz1UzEWPhv+K8WxRlv94n8XGe 535AJ3LbTmYayoy0g5zUQrsLzupqIXfjqT0rSKxbHrgsAwUoPO6ggUlUTEPyIS/I+C+XHuEoe5Tm0k NjFz7NgKnvGJHdBR0BJUVi4biaS2jrA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 68fde73e-58d2-11ea-b80e-052b4a66b6b2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 68fde73e-58d2-11ea-b80e-052b4a66b6b2; Wed, 26 Feb 2020 19:58:54 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 01QJwpuR031365; Wed, 26 Feb 2020 12:58:51 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <6eae8193e54b29320b63d4f1a3442a0c455fa12b.camel@freebsd.org> Subject: Re: FreeBSD raspberry pi C compiler strangeness From: Ian Lepore To: Wojciech Puchar , freebsd-hackers@freebsd.org Date: Wed, 26 Feb 2020 12:58:51 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48SRSy3XB3z3R6X X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.95 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.95)[-0.954,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 19:58:59 -0000 On Wed, 2020-02-26 at 20:45 +0100, Wojciech Puchar wrote: > i wrote my program and tested completely my program on x64 laptop > under > FreeBSD 11 > > then i compiled this program under FreeBSD on raspberry pi (quite > latest > version downloaded less than 2 months ago). > > And program didn't work properly. > > Finally i found a problem. > > char is signed by default on x64. > > On raspberry pi char is unsigned by default. > replacing "char" with "signed char" fixed problem completely. > > Why char is unsigned on FreeBSD/raspberry pi? > The C standard allows plain char types to be signed or unsigned by default. Char has always been unsigned by default on arm platforms (not just freebsd, it's mandated by the ARM ABI document). Usually when you run into trouble with this, it's a sign that your code should be using int8_t, not char. If the trouble arises with something like calling getc(3) and testing for EOF, the problem is that getc() returns an int, not a char, so you need to assign the return value to an int for testing against EOF. -- Ian From owner-freebsd-hackers@freebsd.org Wed Feb 26 21:38:04 2020 Return-Path: Delivered-To: freebsd-hackers@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 B7C2F246ED3 for ; Wed, 26 Feb 2020 21:38:04 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 48STgH1sJyz49pS for ; Wed, 26 Feb 2020 21:38:03 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f179.google.com with SMTP id a22so1052890oid.13 for ; Wed, 26 Feb 2020 13:38:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CS4QQ88LIF1b5iTSlVsf9yRpGE8mNF+y4MbqztAve+o=; b=sZIJyGls2vD3V01BvcoN8JXxZPkgLrutfoxnkPO6xnpOso5bXLfZhi+Ot9DTcumHF7 S9p0ve3vKYN5k7K0R1dCrfYKlz5xrnESsBaUWresDYc5uqgdlSieboY1t7sJBXQU5+kW CaRFAPFUzxqB99iMN2EXk+mDAjYP1cMKt/og9dHizxBE5AGt6JqHapspUl6Gmi3romVK enlIeUbWXAVPfliz8Gcs0srDy/AWx11gHjaKuvGtLkNkpTOz5HUxaKO+LFi7ytVRrUDR JVEcAQw9lymIk+MGsq8IslRZdZJteDTw+mwqKYYdPmmh0SZgD7iRqXB26NYUHEeCNUpo 0Qsg== X-Gm-Message-State: APjAAAWCJ4vdJXQ98h20slyQLQ40UeFFLl4TVY4HH41D8kMzAvyaft8t QADG2Sekroou2TnceAiFb3Np6VezFcYHkxGKsIh7dg== X-Google-Smtp-Source: APXvYqzBMu6XSQVux4wM7+SVzyWBlsp+Dfkdo7v9qlhn5FOevl5DaRn6/4ovWgBeU+D7xFdm1oBHPlAfN8cd9tWKYvA= X-Received: by 2002:a05:6808:a8e:: with SMTP id q14mr795848oij.173.1582753081974; Wed, 26 Feb 2020 13:38:01 -0800 (PST) MIME-Version: 1.0 From: Alan Somers Date: Wed, 26 Feb 2020 14:37:51 -0700 Message-ID: Subject: /etc/periodic/daily/330.news To: FreeBSD Hackers X-Rspamd-Queue-Id: 48STgH1sJyz49pS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.179 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[179.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.99)[ip: (-0.26), ipnet: 209.85.128.0/17(-2.99), asn: 15169(-1.67), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[179.167.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_TLS_ALL(0.00)[]; TO_DOM_EQ_FROM_DOM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2020 21:38:04 -0000 Is there any reason for /etc/periodic/daily/330.news to exist? As far as I can tell, it hasn't seen any interesting changes since it was first added in 1997, and the base system has never had a builtin news client or server. Shouldn't this file belong in a port somewhere? -Alan From owner-freebsd-hackers@freebsd.org Fri Feb 28 02:26:51 2020 Return-Path: Delivered-To: freebsd-hackers@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 DF0E9256BF0 for ; Fri, 28 Feb 2020 02:26:51 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48TD233Pq5z4S0F for ; Fri, 28 Feb 2020 02:26:51 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 4FCF0256BEF; Fri, 28 Feb 2020 02:26:51 +0000 (UTC) Delivered-To: hackers@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 4DC43256BED for ; Fri, 28 Feb 2020 02:26:51 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 48TD21677wz4Rvh for ; Fri, 28 Feb 2020 02:26:49 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-wm1-x344.google.com with SMTP id m10so8293075wmc.0 for ; Thu, 27 Feb 2020 18:26:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nZKIm/wCA3WpNS8B9uq/XHs9b6rqGBbrnf0fg7ENipE=; b=HuZjxHCcVzjlKiPKSPPuPC1ZxvtWsQAzAno+5PXNYdwNoFhdxQQiCLKbfLTQgC0pID cjkF8B5p/gnxcmsgwp/A5SiWtE7AgQrntS1G2Fcm34wuNgoSw68ib4IU5A/EBQYcQNGD nFSoIham1FAumzJ8Fnwn+5e8V/hBkrDpwC13kxvYROvbSCXWakB/Wk5Fev1zNME2LsPL XWdVYE60W+wtqHeJX20Y4iQX8SbmAwRlh2/ADtjIGaU1LR6FVoOYILOgZ0Udb47cC+sp lzk5PJaImsj4OtpTvKvhe57gv0VRULzi2SDJG0H9pGLHEe8xJfF9+nDmEepF0FWmIn9H 4q7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nZKIm/wCA3WpNS8B9uq/XHs9b6rqGBbrnf0fg7ENipE=; b=NkXVG9sqwV8bWhIP6weZoyJeoWo1F5ngyxsG+2J70oCgRq3BptXMffMmTN/hfv5NiJ /soJVSKb5vIMfL98JBIit6UbYVj7ho8ja7+nvsZ4WTjn1CVhbmSwW/bN/VSJEUObcmQT 0SPjcq1VI+Bjn7+gWVJ5Ni0eew8svDWIyIic+KtzFxaY1mcQysebU5exiNw5WNvfFTmG 617AQwdlR2FgvKuZosNGWczbmENtWK0SeXhxJDyf41uwSRSVADNQjVmeAk0jYL5I55vs La5GrAGUf4PK5o9KEbzQJMrubzK16Vx7ZLNeR1LZckhbzlp+KM7MoWs0NTDCGFkiljDq OogA== X-Gm-Message-State: APjAAAUnoKHOtiDXQbm2sd3wO5/n6lqz/hyTUJJwaYhNA8kU96PAFtgP 7xdQ9L7OAeFNAgaPIH+6KAzC31E1 X-Google-Smtp-Source: APXvYqyaU6slYsQmxpzoH7HT81OInVDvFa3umP2QTTNoC+yDlv7fECNUmnoc0UAjT/6p22ufP8qCEg== X-Received: by 2002:a1c:660a:: with SMTP id a10mr1901863wmc.122.1582856808000; Thu, 27 Feb 2020 18:26:48 -0800 (PST) Received: from localhost ([213.149.54.218]) by smtp.gmail.com with ESMTPSA id a62sm61412wmh.33.2020.02.27.18.26.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 18:26:47 -0800 (PST) Date: Fri, 28 Feb 2020 03:26:44 +0100 From: Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= To: hackers@freebsd.org Cc: Mark Saad Subject: Re: Slow PXE boot Message-ID: <20200228032644.000018c3@gmail.com> In-Reply-To: <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48TD21677wz4Rvh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=HuZjxHCc; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rank1seeker@gmail.com designates 2a00:1450:4864:20::344 as permitted sender) smtp.mailfrom=rank1seeker@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (2.60), ipnet: 2a00:1450::/32(-2.41), asn: 15169(-1.67), country: US(-0.05)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[4.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 02:26:52 -0000 Mark, PXE clients are directly connected to FreeBSD based PXE server, with same E= TH cable. There is no any intermediate hardware like switch, etc ... Regarding '... running at 100mb 1/2 duplex', nope ..., in bios setting is a= ll set to "max" for NICs Finally, result is always 100% repeatable for both tested clients. One always being super fast and the other, unbelievably slow ... On Mon, 24 Feb 2020 08:46:20 -0500 Mark Saad wrote: > Domagoj=20 > I regularly boot 11.3-Stable and 12.1-Stable amd64 on servers with > 64gb, 128gb , and occasional more . I do t have that issue . Can you > take a peak at the switch your boxes are attached to ; It sounds like > a device is running at 100mb 1/2 duplex . I remember the realtec nics > doing this when set to auto .=20 >=20 > --- > Mark Saad | nonesuch@longcount.org >=20 > > On Feb 23, 2020, at 9:23 PM, Domagoj Smol=C4=8Di=C4=87 > > wrote: > >=20 > > =EF=BB=BFYo Crew! > >=20 > > During PXE boot, from server (11.3-RELEASE-p5 i386) with 1 GB RAM, > > client with: 4 GB RAM booted kernel in ~2 min > > 8 GB RAM booted kernel in ~20 min (at least) > > So all below is tested with 2 different clients, each with NIC of > > different manufacturer (Realtec & Intel) > >=20 > > I've read on forums that if client has much, much more RAM than > > server, this happens. Suggestion was to to set loader(8) tunable > > hw.memtest.tests to 0, so client would skip RAM test. > >=20 > > PXE boot is served to clients from /PXE, so ... > > Setting hw.memtest.tests=3D"0" in /PXE/boot/loader.conf, yielded no > > results! > >=20 > > By the way, for some reason, hw.memtest.tests tunable DOESN'T exist > > in man pages! I had to look in source code to confirm it still > > exists. > >=20 > >=20 > > Next, I've tried: > > # echo 'nfs.read_size=3D"16384"' > /PXE/boot/loader.conf > > Changing value to ANY value other than default 1024, completely > > halts client's kernel loading at 'Loading kernel...'! > >=20 > >=20 > > Lastly, I've tried tactic used with UFS's stage 2 /boot/boot, to > > skip stage 3 loader completely and to directly load kernel instead. > > So in dhcpd.conf, I've replaced: filename "boot/pxeboot"; > > with: > > filename "boot/kernel/kernel"; > >=20 > > Result: > > Attempt to pull GENERIC kernel directly, resulted in: "NBP is > > too big to fit in free base memory" Maybe I should try to compile > > custom minimal kernel 'ident PXE' ... It is unbelievable how many > > problems do I have ... > >=20 > >=20 > >=20 > > Domagoj Smol=C4=8Di=C4=87 From owner-freebsd-hackers@freebsd.org Fri Feb 28 09:03:39 2020 Return-Path: Delivered-To: freebsd-hackers@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 63DA025E28A; Fri, 28 Feb 2020 09:03:39 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 48TNqt2j9hz4B5q; Fri, 28 Feb 2020 09:03:38 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: by mail-wm1-x32b.google.com with SMTP id m10so8858547wmc.0; Fri, 28 Feb 2020 01:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=JWM2CyapOK7wXHewObTe2Y3FnRDjW3i4+6ZxSke8TA4=; b=OtwIJ59v10yKJxMgOiKIcsxIfTDU/Rv8ILpnd6WSWCykOMQTuQY4oRTVieRM7EWsbl wyK4Yt6D3VWj7WYMCyDPzZrkMHw+wzZaRJzr8i73YcVmtg4Ga4quz7LK2caUwHdOzK/Y JYgFgf8yPf7C8CSIz4hfUY2dmyiTwD2pYRn8NUNKtEMV4awoYweVvv540tmxv4FJhI1a s1G1I6ThSPZqZJKJ45l7K0qa/iLfYIqwu2WnU5Pbbs1IiC7eVehIoHLFwk5rlNJoRmf0 qCSWu809KjdDADM89n5ZvnX7/8Vn7nizFhzDa4D8Y0+wnuQDY6PF4+W2FBPINXRDgxex H1Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JWM2CyapOK7wXHewObTe2Y3FnRDjW3i4+6ZxSke8TA4=; b=Dr7nX62V2jNM8VEXHYQUUWgXECeOHZcHFRKaI3oyGulff6t26M2hN0aYgMC1kj6QY6 LMUzDCXz7+rtzQRV9D9zFwYq2fwXOd2Mk8mfGa9A8PkSfh++462FRf0Rzf9KBbgx8XUz lBztzTpkTVm7c6XrSHT13yhNTls4flqcSSAYX9IXX9KAqmiHhf+ZV5YI1+hXO2jJAV+k OqdO/Fy2ybGuNa32bje87tK1usOHMai/ncckT++e4qSDw/7O2xinYqL+p4U8nvqCRVDZ T2njHju4Ynf+yw0qJsu6jfUoimLhShALNGm7JTb6EY2hRmIBlvthvWJIHC0B0Xd6SoHe wbXw== X-Gm-Message-State: APjAAAV52qdw21Jq4wrq7pGUA0LPJ03wHfW/F4rfATUGQSmGTUnYgNfB br+4yR+oweOXJg7B9QOLSiRJFF420BuHmHBynp5biQ== X-Google-Smtp-Source: APXvYqwPHg4hDda0TTO9t1yolVAElyOSffHxMjveVN/JFvEZhQC2MZ3Ko7s7VX4o9+M+4jir4LozMkuhNlXf9bAOHaM= X-Received: by 2002:a1c:6a15:: with SMTP id f21mr3711316wmc.126.1582880616386; Fri, 28 Feb 2020 01:03:36 -0800 (PST) MIME-Version: 1.0 From: Rajesh Kumar Date: Fri, 28 Feb 2020 14:33:25 +0530 Message-ID: Subject: Network throughput not reaching line rate. Need clarification on iflib. To: freebsd-drivers@freebsd.org, FreeBSD Hackers X-Rspamd-Queue-Id: 48TNqt2j9hz4B5q X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=OtwIJ59v; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rajfbsd@gmail.com designates 2a00:1450:4864:20::32b as permitted sender) smtp.mailfrom=rajfbsd@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (-9.15), ipnet: 2a00:1450::/32(-2.41), asn: 15169(-1.67), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[b.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 09:03:39 -0000 Hi FreeBSD team, I am writing a network driver using iflib framework and using "iperf3" tool for performance testing. 1) 10G link with 9000 MTU. Seeing line-rate numbers on both Tx and Rx path. 2) 10G link with 1500 MTU. Seeing line-rate numbers on Tx path, but low numbers on Rx path. I suspect the driver design here, but need some clarification on the iflib framework. My driver expects two memory buffers per receive descriptor. So I used "2 fls" per rxq (means isc_nrxq = 1, and isc_nfl = 2). For every descriptor, I use the memory buffers at same index from both the free-lists to refill my descriptors. Also, I return the fragments with appropriate index and flid from rxd_pkt_get. This approach works for me. But I am facing performance issue as stated above. So, Is this approach perfect? or any better way of doing? Also, I did a quick analysis of tcpdump on both iperf3 server (my test side) and client side(support side). iperf3 clients pumps traffic to iperf3 server. After a point, server sends an ACK with SACK option (SLE and SRE) to indicate missing frame to the client. And client is re-transmitting that segment as per protocol and the server receives it. But still I see the ACK sent again with SACK option. So client keeps on re-transmitting the packets and hence the performance drops. Any reason why server is not acknowledging the re-transmitted packet? If the driver Rx isn't proper, then I may not see the packet in tcpdump. But I see it. So any idea, what could be wrong here? Please let me know if any more details are needed. Thanks, Rajesh. From owner-freebsd-hackers@freebsd.org Fri Feb 28 09:34:58 2020 Return-Path: Delivered-To: freebsd-hackers@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 5BD0A25EB9D; Fri, 28 Feb 2020 09:34:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48TPX073DJz4NRs; Fri, 28 Feb 2020 09:34:56 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3DBD826010C; Fri, 28 Feb 2020 10:34:49 +0100 (CET) Subject: Re: Network throughput not reaching line rate. Need clarification on iflib. To: Rajesh Kumar , freebsd-drivers@freebsd.org, FreeBSD Hackers References: From: Hans Petter Selasky Message-ID: <7cfc7c52-b548-19bd-343b-899aca45c654@selasky.org> Date: Fri, 28 Feb 2020 10:34:36 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48TPX073DJz4NRs X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-5.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-3.12)[ip: (-9.32), ipnet: 88.99.0.0/16(-4.71), asn: 24940(-1.55), country: DE(-0.02)]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 09:34:58 -0000 On 2020-02-28 10:03, Rajesh Kumar wrote: > Hi FreeBSD team, > > I am writing a network driver using iflib framework and using "iperf3" tool > for performance testing. > Is there any difference with "iperf" tool and using multiple threads? I think iperf3 is single threaded ??? --HPS From owner-freebsd-hackers@freebsd.org Fri Feb 28 10:06:58 2020 Return-Path: Delivered-To: freebsd-hackers@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 EC5CF25F2CE for ; Fri, 28 Feb 2020 10:06:58 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (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 48TQDv4ccKz4cLT; Fri, 28 Feb 2020 10:06:55 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id 01SA6n2F053712 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 28 Feb 2020 11:06:50 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1582884410; bh=W79TdL2OdFOfjPtaq81dOVZ42ZvE5wR8qDFmaJa5reo=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=PgFQ7csZAlW7xOKHnyD19V+ZkOruK17ldLIZidLTXkQAfYvtUVk6pCmhVEeLaRGbD WbfHH8jKBh/7QUrlObgdVzqC0cLGOXFYZWBqvKOl9cli6YAO1W6EW2VhXZezzs3pcw DYiqM+xgWK5jqRLh7CBlPobZgvmX5ysZAyv4pKMQ= Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id 01SA6nXf053708; Fri, 28 Feb 2020 11:06:49 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) Date: Fri, 28 Feb 2020 11:06:49 +0100 (CET) From: Wojciech Puchar To: Ian Lepore cc: Wojciech Puchar , freebsd-hackers@freebsd.org Subject: Re: FreeBSD raspberry pi C compiler strangeness In-Reply-To: <6eae8193e54b29320b63d4f1a3442a0c455fa12b.camel@freebsd.org> Message-ID: References: <6eae8193e54b29320b63d4f1a3442a0c455fa12b.camel@freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 48TQDv4ccKz4cLT X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=fail (rsa verify failed) header.d=puchar.net header.s=default header.b=PgFQ7csZ; dmarc=none; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-3.86 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_REJECT(1.00)[puchar.net:s=default]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[puchar.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[puchar.net:-]; RCVD_IN_DNSWL_NONE(0.00)[90.144.1.194.list.dnswl.org : 127.0.10.0]; IP_SCORE(-2.57)[ip: (-6.78), ipnet: 194.1.144.0/24(-3.39), asn: 43476(-2.71), country: PL(0.06)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 10:06:59 -0000 >> >> Why char is unsigned on FreeBSD/raspberry pi? >> > > The C standard allows plain char types to be signed or unsigned by > default. Char has always been unsigned by default on arm platforms thank you. i was sure that char is signed by standard. From owner-freebsd-hackers@freebsd.org Fri Feb 28 10:51:33 2020 Return-Path: Delivered-To: freebsd-hackers@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 2437825FFC5 for ; Fri, 28 Feb 2020 10:51:33 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48TRDP01kWz4Bdj for ; Fri, 28 Feb 2020 10:51:33 +0000 (UTC) (envelope-from se@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id E375F25FFC4; Fri, 28 Feb 2020 10:51:32 +0000 (UTC) Delivered-To: hackers@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 DDDD825FFC3 for ; Fri, 28 Feb 2020 10:51:32 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TRDN4kS1z4Bd5; Fri, 28 Feb 2020 10:51:32 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-449.fritz.box (p200300CD5F127700AD63170E203181C5.dip0.t-ipconnect.de [IPv6:2003:cd:5f12:7700:ad63:170e:2031:81c5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 071071FFDA; Fri, 28 Feb 2020 10:51:31 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: Slow PXE boot To: =?UTF-8?B?RG9tYWdvaiBTbW9sxI1pxIc=?= References: <20200224032300.00006290@gmail.com> <8F7B8958-5295-4A26-82E9-94C7A62ED8A1@longcount.org> <20200228032644.000018c3@gmail.com> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Message-ID: <29a13654-3b80-52d3-25cd-463073294126@freebsd.org> Date: Fri, 28 Feb 2020 11:51:28 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200228032644.000018c3@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 28 Feb 2020 14:27:29 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 10:51:33 -0000 Am 28.02.20 um 03:26 schrieb Domagoj Smolčić: > Mark, > > PXE clients are directly connected to FreeBSD based PXE server, with same ETH cable. Hi Domagoj, this looks like a duplex mis-configuration, even if you think everything is set up correctly. I've seen this multiple times ... > There is no any intermediate hardware like switch, etc ... Then there may still be no auto-negotiation of Ethernet parameters like duplex mode. If one NIC is set to auto-configure (the default in FreeBSD) and the other hard-configured to max performance (which includes full-duplex), then there will be NO auto-configuration of the NIC on the FreeBSD side. The standard reuqires that a NIC that is not flexible in its settings does not participate in the auto-negotiation sequence. And FreeBSD will then use lowest common demoninator settings, i.e. 100 Mbit/s and half-duplex! Did you check the NIC interface counters, e.g. as reported by "netstat -i" on the FreeBSD side? > Regarding '... running at 100mb 1/2 duplex', nope ..., in bios setting is all set to "max" for NICs Do both NICs perform an auto-negotiation or has one of them fixed settings? As written above: Fixed settings do not mean that these settings will be reported in the auto-negotiation attempted by the other side. It will make the NIC ignore the auto-negotiation attempt and it will make the other side fall back to safe defaults (which may lead to a duplex mismatch, if the "fixed side" is set to full-duplex). > Finally, result is always 100% repeatable for both tested clients. > One always being super fast and the other, unbelievably slow ... This proves that a fast boot is technically possible. If you were to connect a network sniffer (or switch with package snoop capability) to the connection, then you'd probably see lots of re-transmissions because of "collisions" that are detected due to the duplex mismatch ... Regards, STefan From owner-freebsd-hackers@freebsd.org Fri Feb 28 16:35:02 2020 Return-Path: Delivered-To: freebsd-hackers@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 67CAE266BA5 for ; Fri, 28 Feb 2020 16:35:02 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TZrj38FKz3y2P for ; Fri, 28 Feb 2020 16:35:01 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: debdrup) by smtp.freebsd.org (Postfix) with ESMTPSA id 32EE32C0C for ; Fri, 28 Feb 2020 16:35:01 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: by mail-oi1-f178.google.com with SMTP id p125so3390615oif.10 for ; Fri, 28 Feb 2020 08:35:01 -0800 (PST) X-Gm-Message-State: APjAAAW2Mt8tzINfHND/P48NgiLtkiQ7wvAKfAtq4xwjNZTHsrT40C+H Cx8vsku6rYiMXKkb1PFDwBn2vT1FUVfEKvQ3y3pFcw== X-Google-Smtp-Source: APXvYqyPvngcCRND7FjzNQVIRR3XEnsF0Z5IMzhNkiGpaQRvD3+xel50IeSdVP0xWgHA8w6zSZ7Tso0G6azuz8durWI= X-Received: by 2002:aca:c3d1:: with SMTP id t200mr1574470oif.41.1582907700441; Fri, 28 Feb 2020 08:35:00 -0800 (PST) MIME-Version: 1.0 References: <7cfc7c52-b548-19bd-343b-899aca45c654@selasky.org> In-Reply-To: <7cfc7c52-b548-19bd-343b-899aca45c654@selasky.org> From: Daniel Ebdrup Jensen Date: Fri, 28 Feb 2020 17:34:48 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Network throughput not reaching line rate. Need clarification on iflib. To: freebsd-drivers@freebsd.org, FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 16:35:02 -0000 Yes, iperf3 will default to single-threaded packet generation, et al. which favours fast cores with frequency boosting facilities. You might want to use iperf2 as that's properly multi-threaded, or you can use pkt-gen out of src/tools/tools/netmap/ or ports/net/pkt-gen. On Fri, Feb 28, 2020 at 10:35 AM Hans Petter Selasky wrote: > On 2020-02-28 10:03, Rajesh Kumar wrote: > > Hi FreeBSD team, > > > > I am writing a network driver using iflib framework and using "iperf3" > tool > > for performance testing. > > > > Is there any difference with "iperf" tool and using multiple threads? I > think iperf3 is single threaded ??? > > --HPS > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Fri Feb 28 22:17:18 2020 Return-Path: Delivered-To: freebsd-hackers@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 69E4124771A for ; Fri, 28 Feb 2020 22:17:18 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48TkRf0hgxz4H8m for ; Fri, 28 Feb 2020 22:17:18 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: debdrup) by smtp.freebsd.org (Postfix) with ESMTPSA id B8D73567E for ; Fri, 28 Feb 2020 22:17:17 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: by mail-oi1-f177.google.com with SMTP id 2so4409994oiz.5 for ; Fri, 28 Feb 2020 14:17:17 -0800 (PST) X-Gm-Message-State: APjAAAWGqwsyaqbHqTUry1p6I2D7aqBrVgtM6tYAZBw4f1Pr0x8V468x 3X2YGdBZLe2waAznDSkZ1T6h0PNSagy95GqH0x/m4A== X-Google-Smtp-Source: APXvYqy0abzTF+dPdXim9UuaxsOpYqLukL/Fq3LKhgjx9WBuQpCtBVfC0l8lj9eJ/ZWkHa2Sb+bNT46ezjZ6SPmqpeU= X-Received: by 2002:a05:6808:aba:: with SMTP id r26mr4520520oij.4.1582928236971; Fri, 28 Feb 2020 14:17:16 -0800 (PST) MIME-Version: 1.0 References: <7cfc7c52-b548-19bd-343b-899aca45c654@selasky.org> In-Reply-To: From: Daniel Ebdrup Jensen Date: Fri, 28 Feb 2020 23:17:03 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Network throughput not reaching line rate. Need clarification on iflib. To: freebsd-drivers@freebsd.org, FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 22:17:18 -0000 On Fri, Feb 28, 2020 at 7:39 PM Bruce A. Mah wrote: > [Resending with a From: address that hopefully works better.] > > If memory serves me right, Daniel Ebdrup Jensen wrote: > > Yes, iperf3 will default to single-threaded packet generation, et al. > which > > favours fast cores with frequency boosting facilities. > > You might want to use iperf2 as that's properly multi-threaded, or you > can > > use pkt-gen out of src/tools/tools/netmap/ or ports/net/pkt-gen. > > While it's true that iperf3 is single-threaded, it should be capable of > saturating a 10GE link with a single TCP connection, given proper > command-line arguments (in particular, specifying a sufficiently large > socket-buffer size with the -w option). > > But based on the symptom of packet loss, I'd say the single-threaded vs. > multi-threaded argument might not be relevant to the problem that the OP > has. > > Bruce. > > > On Fri, Feb 28, 2020 at 10:35 AM Hans Petter Selasky > > wrote: > > > >> On 2020-02-28 10:03, Rajesh Kumar wrote: > >>> Hi FreeBSD team, > >>> > >>> I am writing a network driver using iflib framework and using "iperf3" > >> tool > >>> for performance testing. > >>> > >> > >> Is there any difference with "iperf" tool and using multiple threads? I > >> think iperf3 is single threaded ??? > >> > >> --HPS > >> > >> _______________________________________________ > >> freebsd-hackers@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >> To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" > >> > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" > > > Oh, I didn't mean to imply that that wasn't part of the issue - I'm sorry if I made it sound like that. I was just confirming what Hans was asking, and possibly using the excuse to mention some things in base/ports that I think are also pretty neat. :) Also no longer top-posting, which was rather ghastly of me. I apologise.