From owner-freebsd-current@freebsd.org Tue Jan 23 02:33:59 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58869EC532A for ; Tue, 23 Jan 2018 02:33:59 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18F947CC96; Tue, 23 Jan 2018 02:33:59 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-it0-x22a.google.com with SMTP id e1so12079550ita.0; Mon, 22 Jan 2018 18:33:59 -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; bh=LOJfhOKCcbI0XkewET91qJ0KUyPkjxAJyZ7dQKXrt9E=; b=IR30767IcCvL5AEpChBtsyFU1jP426kP52l5/xr4ON1RuRBQ8ojp5AfbCt1VNXpo7K 0NIW1QnVaEOafnMHBA4tQvnOgU4W+cdItvcrqPeic/4WUXJm9OR2psWS1wxZhMrsRWXH Gtnr5UHXV/y6UkgvPE6MyO8i97YBcxmCb5QTaCrdy4UrsUJXvliivQVYXhkNqyWhZoEC Afkye04IQxm01CwDq4nR2V+c8o4x3juEpTopdgDKMJEQXyGWdIKY3tMUKmUlAI0wEIZ8 Mt8rgise84t3bOgT0kp5aVP+LbrXk5biGTCpbv5ZbbrS6/EM/IEvg4/6rkHkJv4Jok/9 AYEA== 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; bh=LOJfhOKCcbI0XkewET91qJ0KUyPkjxAJyZ7dQKXrt9E=; b=X1tjPSr7uqgznpuQZLCk0/vgqqvmELi+3dM7m3hAonX77fEniptl08IPWuhP/hCfgr 8AoYu0YlA/kVDxBDI3giOvVnUOesFr7eeyS4BAAhVGo6SON4Q3pCTpO46pqfG8C3zrJq ue8pufnUHhTfeKI+XwYJ/T7cBueNd4BNOi85LtcemRPDsTJgkCdCYEfhsoigsIgXYZy4 rwLqO60NYBPST0x4QvwDHfW84FuiZK/hret+MppZju5OXhj352tg7uyqXyGLDruuuVPU kZ/lCjUoUi8k0GgEJTI7hy13PKDSpDITGWmVw8BviH/sPbpgcxcBqrJdd65mJbI2CH/d q/OA== X-Gm-Message-State: AKwxyteR0vYWU51bvFNEhqKsDtxKDEykQlS2toIeAnJj4AQQzaS9oI6/ e7J90PERNSrdjdk6lNwtQl2nPPnobmr//tR0vJ0= X-Google-Smtp-Source: AH8x227sY/tM8tyUXpKIyrcqFKOjykDrf+jC4x8sY0PoFXOuPZec0H8KsY/L+JDwcFsDluq8Nld2ZtzcPtMXOOy0ZWc= X-Received: by 10.36.50.73 with SMTP id j70mr1548259ita.149.1516674838423; Mon, 22 Jan 2018 18:33:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.10.97 with HTTP; Mon, 22 Jan 2018 18:33:57 -0800 (PST) In-Reply-To: References: <64218617-98d2-0e6e-5872-e44106e61bf7@selasky.org> <1516569725.42536.99.camel@freebsd.org> <0aceb3ff-4938-1b29-d493-d83ce82cc853@selasky.org> From: blubee blubeeme Date: Tue, 23 Jan 2018 10:33:57 +0800 Message-ID: Subject: Re: Periodical interrupt storm when playing game with USB keyboard To: Adrian Chadd Cc: Johannes Lundberg , Hans Petter Selasky , Ian Lepore , freebsd-current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 02:33:59 -0000 On Tue, Jan 23, 2018 at 9:48 AM, Adrian Chadd wrote: > Hi > > Yeah the timers eventually get coalesced unless someone's asking for a > ridciulously accurate timer value. > > So is some driver asking for hyper-accurate callout timer that isn't > being coalesced? hps, is there any useful debugging to try and find > callouts that are requesting stupidly accurate timers? Maybe a dtrace > probe on the callout schedule entry point? > > > > -adrian > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > I'd say dtrace might be able to get you in the right direction very quickly. I used SDL in the past for android apps and the code is very Linux specific. I am sure there's some Linux related timers in there somewhere that FreeBSD is returning nothing from and that's what's killing the performance. I can almost guarantee that none of the SDL designers and or programmers use any *BSD systems. The easiest solution would be to go look at the timer code and implement something that FreeBSD can work with and try to get that upstream. These are just a few of the issues that will crop up when devs try to just use shims to hook into the Linux kernel. Do the design work up front and implement things in a native way or enjoy the jank. DTrace should be able to point you in the right direction relatively quickly. The DTraceBook: https://www.amazon.com/DTrace-Dynamic-Tracing-Solaris-FreeBSD/dp/0132091518 Best