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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 07DCEC55186 for ; Thu, 23 Apr 2020 15:04:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 BA47120857 for ; Thu, 23 Apr 2020 15:04:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="LHFnQrF5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA47120857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B53C89C6A; Thu, 23 Apr 2020 15:04:42 +0000 (UTC) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2073.outbound.protection.outlook.com [40.107.237.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3534D89C6A for ; Thu, 23 Apr 2020 15:04:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AkTpic1xOBvHXzvYS4b7gYzs10WZ6bE8Q1jsVWlEbo9dZa3xBnZn39faAUPTUKbIs5j0mP1ms8vcJPLmnFaz9KRwv2tzExGceS/zuTm5fUr2pWMt0mrkWSrmQLNyetkluMoyPxcJPld0Q1v1tCBvksvYlNnXg6yjDYJmYm5VMZCB43RCb9YrBhE5sN1Fs3UYRyMoUpkZ0zEvPbWGvN2yAb8UxKHphzHzDt7kTwWVfZpgWA1J36f42lJpfhNqmJjqHDaUWJf8ii0bPodNM/M/w5/K22RAPFrBnw8+WvnYOrsp/q4gEFafHAiyvRtyRyYeqYCDotrPgRhXYtHVUfMmug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JcJdeK/yvT3Uhxm21U6TsBbb9jvoRtP5To4vzMnKvCg=; b=OTSIqAP7fnR5BdJFe04BAPiO8+5rAlMStvGyey6oP32Z7Eaa9kKFtycESrHVrZuxss8z1F6xS5nhL45lgAyySYDA6d2/KkGZP3ZSF1IblNG+pzCFY7pjB3Gme5G5mofYE10it5R6E2qVLXEqQRVvMAaR/0bvsFcyREACKPheyL7DQLBbXD7Qb0xNoyj+v3BkVfzyyqgQn40pnQQAz9lOrxxeH5Fb9ieG/cAu5KYaLSXejyYhlJLCFXkjVL+vMF4uIibMA+565p/IBctwvboQMdmKzHOA4PYAjX5gMyk0DfZydjrurRlzRNld9w0lHvjaEo5LKSW4rMCd+ntvaL0ChA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JcJdeK/yvT3Uhxm21U6TsBbb9jvoRtP5To4vzMnKvCg=; b=LHFnQrF5/hPRRoexq+PvseMoSSnymgb/XL/MPF25U1G583AG+zoThUTUYUlQonGm2XNk7xPWxviPtIOPUzdzR3gT+J/dcBjqflLEExyNjygPMYt88IOymnhNjJ3ylJfi5PCmKWIifaWQMdT8WgZ0wzQ+KdVVxVUHsxIlTxEGnFg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Christian.Koenig@amd.com; Received: from DM6PR12MB4401.namprd12.prod.outlook.com (2603:10b6:5:2a9::15) by DM6PR12MB4546.namprd12.prod.outlook.com (2603:10b6:5:2ae::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27; Thu, 23 Apr 2020 15:04:38 +0000 Received: from DM6PR12MB4401.namprd12.prod.outlook.com ([fe80::7949:b580:a2d5:f766]) by DM6PR12MB4401.namprd12.prod.outlook.com ([fe80::7949:b580:a2d5:f766%3]) with mapi id 15.20.2921.033; Thu, 23 Apr 2020 15:04:38 +0000 Subject: Re: [PATCH 2/2] drm/vram-helper: Alternate between bottom-up and top-down placement To: Gerd Hoffmann , Thomas Zimmermann References: <20200422144055.27801-1-tzimmermann@suse.de> <20200422144055.27801-3-tzimmermann@suse.de> <20200423111808.fbh23br7jrkte3ih@sirius.home.kraxel.org> <20200423135709.3yuafqt3xouka4jp@sirius.home.kraxel.org> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: Date: Thu, 23 Apr 2020 17:04:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 In-Reply-To: <20200423135709.3yuafqt3xouka4jp@sirius.home.kraxel.org> Content-Language: en-US X-ClientProxiedBy: AM3PR07CA0058.eurprd07.prod.outlook.com (2603:10a6:207:4::16) To DM6PR12MB4401.namprd12.prod.outlook.com (2603:10b6:5:2a9::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2a02:908:1252:fb60:be8a:bd56:1f94:86e7] (2a02:908:1252:fb60:be8a:bd56:1f94:86e7) by AM3PR07CA0058.eurprd07.prod.outlook.com (2603:10a6:207:4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.10 via Frontend Transport; Thu, 23 Apr 2020 15:04:36 +0000 X-Originating-IP: [2a02:908:1252:fb60:be8a:bd56:1f94:86e7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c8d690b8-c07d-464c-d5e2-08d7e797a446 X-MS-TrafficTypeDiagnostic: DM6PR12MB4546: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 03827AF76E X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4401.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(376002)(39860400002)(136003)(346002)(366004)(31686004)(186003)(6666004)(8936002)(478600001)(8676002)(81156014)(5660300002)(36756003)(6486002)(110136005)(66556008)(66946007)(316002)(31696002)(2616005)(16526019)(2906002)(66476007)(86362001)(52116002)(4326008); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i2KDeyeUKvZqIqGCjysYnb3qACOB9+/wxr49OxxqsqqJ5kbr4FofI97kXKFRP1XOqzIiH4V2r9CCQ/oIiX1qtnKEyRUe1x/j5Br7Mu4a7V1X7PdNcW9STmEN/ENaVd8DfsKSaBdx51OA97nCNPAi6ZMKS1cl6nM/DDX5H27Eac8Z2TuaUM1/Z1jNS7esE8fhkgn4Etynf6ep8EEHqzS+J0QvA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MkcFYxR39VptyX10mluv62iW1WSIDCg/1010ZRqoBvKfgwIut/xX6o= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8d690b8-c07d-464c-d5e2-08d7e797a446 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2020 15:04:37.9792 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 72IP+Cfz6ch+iqbv2zgu8cD8BjZW3Y2bXbJc3WyQ1/LR4nUEHCgmPkWmDL+S2P5p X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4546 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, sam@ravnborg.org, dri-devel@lists.freedesktop.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi guys, one thing you don't seem to have considered yet is that not setting the top-down flag also won't get you the bottom-up approach, but rather the best fit. Additional to that the top-down allocations have quite a bit more CPU overhead since they don't walk the size tree, but the address tree in search for a fitting hole. Nirmoy is currently working on improving this. Am 23.04.20 um 15:57 schrieb Gerd Hoffmann: >> But cursor BOs are small, so they don't make much of a difference. What >> is needed is space for 2 primary framebuffers during pageflips, with one >> of them pinned. The other framebuffer can be located anywhere. > The problem isn't the size. The problem is dynamically allocated cursor > BOs can also fragment vram, especially if top-bottom allocation is also > used for large framebuffers so cursor BOs can end up somewhere in the > middle of vram. Well maybe instead of a ping/pong approach between top and bottom use a size based approach to place small BOs at the top and only the larger ones at the bottom (or the other way around). Cheers, Christian. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel