From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAE15C10F14 for ; Thu, 3 Oct 2019 16:52:12 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91D982054F for ; Thu, 3 Oct 2019 16:52:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91D982054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.2) (envelope-from ) id 1iG4Kc-0000nl-3I; Thu, 03 Oct 2019 12:51:58 -0400 Received: from omr2.cc.ipv6.vt.edu ([2607:b400:92:8400:0:33:fb76:806e] helo=omr2.cc.vt.edu) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) (envelope-from ) id 1iG4KY-0000ne-Bu for kernelnewbies@kernelnewbies.org; Thu, 03 Oct 2019 12:51:54 -0400 Received: from mr5.cc.vt.edu (junk.cc.ipv6.vt.edu [IPv6:2607:b400:92:9:0:9d:8fcb:4116]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id x93GpqdX031259 for ; Thu, 3 Oct 2019 12:51:53 -0400 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mr5.cc.vt.edu (8.14.7/8.14.7) with ESMTP id x93GplIw013749 for ; Thu, 3 Oct 2019 12:51:52 -0400 Received: by mail-qk1-f199.google.com with SMTP id x62so3313589qkb.7 for ; Thu, 03 Oct 2019 09:51:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=vZq9IB7O1tnkM4ywTPoj/OprU2RW9jcsuZi3dNRuXJE=; b=udfw3ggWb0dx53BN6mgby9zmyX5N4MWvkhbjsdBP9Ql2TV4tvE85uI6L3VlvdfVY90 0JSJj1xXOlV+BKPWj1SyjkTn6cshPDFlpwc2xeAUugnqrIzxXVqQNmancNBr2i6L8/2T ipxUA22naa/HZnRGpo0EB8a2lHEjKz47Zcrj+i0cJjioaB0edd6ifBrkptTynl7v3IZo UL6W67y2VOaNEsPtorxZI387M4Os38LX3FPRsoCUqnPh8I7EFysdYkxYtcGWn0orlZ3x geQa3G6hfMsl0YHVp+uo5fS5IftoBwAl2vjTzLRlUK8jf8hYud8MYlYrDvar91JwKjsf Xx+g== X-Gm-Message-State: APjAAAUt3vYdo3Z1++bN8gJUOITxCiC9bNUa6YMxhaai5onJLBhwk8Q2 XTGQcLGqfQ52ykAYNGUTIAjKXh/KQ9P2Oe29N5uQYYDyxrwnJq5YDxrbK/CQkg19QPKJ9wERoCT SXDNEYJ8GuqTtj3H59I+1mMBcHNJnGXnmcgwL6/8= X-Received: by 2002:aed:20a2:: with SMTP id 31mr10278482qtb.330.1570121506824; Thu, 03 Oct 2019 09:51:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpuEqxayo0aQbEQ/MymCl6NnVuVw0ZQT60YHWrixcuskjYmv2kwqaKWOWDNNVF/sAi3gT7bA== X-Received: by 2002:aed:20a2:: with SMTP id 31mr10278446qtb.330.1570121506369; Thu, 03 Oct 2019 09:51:46 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:4341::9ca]) by smtp.gmail.com with ESMTPSA id b4sm1814853qkd.121.2019.10.03.09.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2019 09:51:44 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Ruben Safir Subject: Re: Do I need strong mathematical bases to work in the memory subsystem? In-Reply-To: <7374125a-646f-7057-347b-f17ef51e9865@mrbrklyn.com> References: <35772.1569819987@turing-police> <919b3d12-5d7e-73f1-d53f-b6a8463bf50b@mrbrklyn.com> <31773.1570073752@turing-police> <0a9418d0-bef3-8631-4c18-b5a31fdd1129@mrbrklyn.com> <20191003070058.GA1814133@kroah.com> <7374125a-646f-7057-347b-f17ef51e9865@mrbrklyn.com> Mime-Version: 1.0 Date: Thu, 03 Oct 2019 12:51:44 -0400 Message-ID: <71184.1570121504@turing-police> Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6933853782620510573==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============6933853782620510573== Content-Type: multipart/signed; boundary="==_Exmh_1570121503_7127P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1570121503_7127P Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, 03 Oct 2019 06:55:50 -0400, Ruben Safir said: > I wouldn't call that C code basic. Regardless, showing an example of a= > driver that doesn't need math, and it might if you understood the high > level math, and your not aware of it, but predictive branching would > need it. =20 See the kernel code that maintains statistical data on likely()/unlikely(= ) under CONFIG_PROFILE_ANNOTATED_BRANCHES. Seems like =22this likely() actu= ally only triggers 3% of the time=22 isn't exactly higher math. There may be some magic going on in the chip hardware - but that's in the= *hardware* and inaccessible to the programmer. I'll also point out that speculative execution has *other* problems..... > You can not calculate simple interest efficiently without calculus.=20 Simple interest is *easy*. Amount * percent. Done. It's compound inter= est that only sort of needs calculus (and there only to understand the limiti= ng case) - and even there I doubt any banks actually use calculus, just appl= y the iterative approach. // yearly interest compounded monthly for (i=3D0;i calculus. This repeadely ends up being an issue of =22if I don't know = it, > I don't need it=22, which is wrong. More math helps you every time. M= ath Somehow I doubt that the Taniyama-Shimura-Weil conjecture is ever going to have any relevance inside the kernel. > is advanced logic. I can't tell you how many times I see folks brute > force their way to solutions that they should be using integration. Can you show an example of where the kernel needs to be using integration= ? --==_Exmh_1570121503_7127P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXZYnHwdmEQWDXROgAQIHaBAArxS+pLggQCJv0pbmwXQh8o8nBX41CL7a iMKOua0ZS4IQH/Wz/KHHvRFL8CHZNsT/S6HLfkgWstKKDN7e4bsc5glckMiuY5dc OIQSZzw+tNmzSZhI/FbigVH4NIDbIkp07uW4WuIFtwwMGw+pa6j6rUmpJWM5q9OQ aixpbhj2qk2SYYpWbzE/j4Yp4HhGNmCsV3/IG8/rn344ZPr50TZDEecwgFr8myhV 0mDMQcHEirjn6c3HIsm6qfnYJ/oqZVT55pPpfaEjOgDks+ncGNsMgup8iaVK39zt ZJBv7tjkdm/dOWjeKafbjpoMxLomLYW/LNxy740fL3mihlWlDQxcuGOf1qDoN0jE UHMw0xZH6LkhpBxoaU9Luiuzvy8HFeTU4tQ4GxVnO40VLqKvsWrgQychHjmXv7Pe vjzGKlCpUvU0pfuPMsH8dmMsMpyxqtkhvx5IuHrPUR1GNvg9IR6V9zw43Kv9jPqO 3qOJfLrM1gZVSsj3n1C15dHW3AHftvSql1XszYZn/0CuAlI2AlkF39M/5WM73p+t e4q4iIFIseNxYzFoRHEzway/BKCC4RZ0X+R5mJGjJdZB9pt9yHSUFTWa3RtpYq78 yaL18Iar3i18NgSMQhQTlHwavvtDBuMLJlEYbh1umQ+DonrnInuR8Ii7kT/kndRx SYUssHnUYOE= =s3N6 -----END PGP SIGNATURE----- --==_Exmh_1570121503_7127P-- --===============6933853782620510573== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============6933853782620510573==--