Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp428914rdb; Thu, 8 Feb 2024 09:47:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IE22LIFfVY56aXPYmDQck7FtvLemKzda/4BPj6H7wv+s0R0PKQXlp422zL3q1BbF+UpUCzU X-Received: by 2002:ac8:678d:0:b0:42b:fcb6:61e1 with SMTP id b13-20020ac8678d000000b0042bfcb661e1mr8840902qtp.31.1707414425180; Thu, 08 Feb 2024 09:47:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707414425; cv=pass; d=google.com; s=arc-20160816; b=aHo+9KwdrYi7q08MqTf2M1WOI9S1AVvkKlQFhPxh9oaX5HwMq0uSgI4wkGHlThiI0i cW4A2ZoDVivWmooPoOFRrciB8x2r7PTRUynVsTY9nO/F/r19zVDV/NFUGuuNrCd2S7wh BXrkoI7vsOmxQGGs7gQWNexr6JQsSAK0RZxiT4sUC7SKf/E1YdUlwgNAcSTO8ZBV2kuJ 6HOpeOhsln0LVRQ6LIkjlJ1G+5wflNTzAU/H1k4FJVUsjGg713tmn/aqdj714n+02WUG /tZuqD7sAdu9Mkl53Fcs1M116+PjxhXIiUE063djzm2zaMc0oG34gaTSmOt/jE38A6Wl nFTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=tKfd7lmWIbfcamrHQWTBL8dnYP6EtyRFZjlbeDKgg2E=; fh=gxxfKdErL/gW+CFnhxveZ4VHRiclCTNxd0s/n6TNDqk=; b=Uz4w76hXe1wE7DV2KxDA+2IPV4chQFggAihxCQwuiCYE+G0cuhe1o4mE/FYTNcqjeO zxcVPqDp8YDMnJiNgRfw8y5jNbUt7yAZrq3bMjHY49nuc6M8h3fV4vfXFO29AV9psddK A4qL7VtR8czecVKcFyCId5JwXj2yu9iJox7oLksnME0bP9Gsn0iFEk97g/jLWeoYDzNs xddKcgnsHvNqqrVdA15TbeOEgaQd9T/OJL2dagONdGuBeT9LBagGVfm2Cz9VucALdgwn vP397OgMTi6yHWc0kRcH+hzzCtlpdyAs/RQScTQQ0y/e24pVJlCHv0l4YbTIuxgsS3tT J0Yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-58483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org X-Forwarded-Encrypted: i=2; AJvYcCWsFNaMmdhc1V4D5YwQwtwSv5EdDFHMyLT+gZFUC1DF83ZA6twUo1f9deE3dTXg5RRoCFqN8cYvUeSmBYJg6162lrZ+ki/nPiVAMsbk2w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l10-20020a05622a174a00b0042a17bf5a11si450920qtk.736.2024.02.08.09.47.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 09:47:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-58483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E76F61C2501C for ; Thu, 8 Feb 2024 17:47:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF6CD86159; Thu, 8 Feb 2024 17:46:11 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE67786124; Thu, 8 Feb 2024 17:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707414371; cv=none; b=KlGWABkOq4lE2oSX+PLeXgfj5MosQdErITssC9/zLZAxbDMQvaJMZv+ebVIUo0UXI7wUdU3nw2OWkGF2uh4nJSKIlJNy1gehk2PfvFHCUmj/dexjhAXd0lmHSMklE9yQxth72w6uyYoYexqGgZm/fbI88eRznXrMrBrzXLMZ/QI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707414371; c=relaxed/simple; bh=KaV20q0GQfGnGgavViyz5KXHwueNCiLVGhY7BqMMw18=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=eeWf1FbkJj6mmlRROpKughQtIEHxJShf6MPQUP/9oYPCzeuBKbJ2SFHNIo3dz1qxoeecJmFd7ZXm2kfFSpqU13ANIDQ9V7N8y0UomuEDDIw/qBw7R9WpeeK1+//3Ul0ZptG4oqHPZ3lTm/iVXN71z30YuZ5uWc0/ParHN9bHuXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=acm.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6e071953676so58776b3a.2; Thu, 08 Feb 2024 09:46:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707414369; x=1708019169; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tKfd7lmWIbfcamrHQWTBL8dnYP6EtyRFZjlbeDKgg2E=; b=D/u2En/7VGG18JgEx6/K1bTJpOLXZQTuoi3Db3q2WN8p4DSPSTFeVLVWLF0NP9cfC6 HftiVg8VHXtjQFeko78gLWRBRvxOre20efyjifuWM7eqDxNw3LI+fD3Os6ahXnvt2QR0 xqBVlsOBEbacblQj2pFd2BzjZR2cTkDIgVpEY3dY4RRXZriloWnLMsT+dUyOVfPbxZOx rvERYE+q/pJHbtNqUPSiKz1cXW5ox4dEheS27scmn2zOAqXM5u3H7/M49E8AfAjq1h/R 4bIsUnz8vv5GxuHouLMDlEEF3wK4NC3oRtTeDHwjK4mC9QqZauGQlNoPqIwEAWON3bAl 2msA== X-Gm-Message-State: AOJu0Yz3B6aX4iqXnCoqn6QJ+eCz7DQcMb/tD8ILQ8H4+bGkgtceYz6j dhAlogssvjliN7Wi66hyHFiiC7uHusU0jLj5HrnbKcCg2p9WaL5oj7oFtBM7 X-Received: by 2002:aa7:8745:0:b0:6e0:7308:7325 with SMTP id g5-20020aa78745000000b006e073087325mr3041016pfo.1.1707414368915; Thu, 08 Feb 2024 09:46:08 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWiuVCKqUeskch1J4BBFbTjt+/A6f91D69wHp0wQEmpUQK1Jglrx6TUKHvJlM3AL20Bs6pd6Cbc32x1vVoMC7cWPDro0Fe+1Ege1XPRm0uY2WsFa9eYGAs2AvNGRqjdCoRbPgmco9StnyXAfV9fEg+4upNpFtubxuSwSt2aS45pDxbHRvnPH/vEVugf6QrP2mTkLpFdv8IdIfQJdXhPvnXAQFLpyhFhwZzureT0XU6wTIIZUeBLSjrMxMYAJx0nE7ZWyNBfDVZtrgC0A2aBoge4CumVLRmuHyy3HF5UpiLPtTd3FTdZsFMt/QOH/LC+aeaUlTW9rta4skTOoWq9ENLyfuGNkhR2KGEI5QrSHI21VkgZBFJBRbbT Received: from ?IPV6:2620:0:1000:8411:6ab9:a725:60e:97d2? ([2620:0:1000:8411:6ab9:a725:60e:97d2]) by smtp.gmail.com with ESMTPSA id lp20-20020a056a003d5400b006e04c3b3b58sm4191879pfb.179.2024.02.08.09.46.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Feb 2024 09:46:08 -0800 (PST) Message-ID: <5f934ebf-4e2a-44f9-993f-8b2c8d358370@acm.org> Date: Thu, 8 Feb 2024 09:46:06 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] block: introducing a bias over deadline's fifo_time Content-Language: en-US To: "zhaoyang.huang" , Jens Axboe , Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Yu Zhao , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Zhaoyang Huang , steve.kang@unisoc.com References: <20240208093136.178797-1-zhaoyang.huang@unisoc.com> <20240208093136.178797-3-zhaoyang.huang@unisoc.com> From: Bart Van Assche In-Reply-To: <20240208093136.178797-3-zhaoyang.huang@unisoc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/8/24 01:31, zhaoyang.huang wrote: > diff --git a/block/mq-deadline.c b/block/mq-deadline.c > index f958e79277b8..43c08c3d6f18 100644 > --- a/block/mq-deadline.c > +++ b/block/mq-deadline.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include "../kernel/sched/sched.h" Is kernel/sched/sched.h perhaps a private scheduler kernel header file? Shouldn't block layer code only include public scheduler header files? > @@ -840,7 +842,9 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, > /* > * set expire time and add to fifo list > */ > - rq->fifo_time = jiffies + dd->fifo_expire[data_dir]; > + fifo_expire = task_is_realtime(current) ? dd->fifo_expire[data_dir] : > + CFS_PROPORTION(current, dd->fifo_expire[data_dir]); > + rq->fifo_time = jiffies + fifo_expire; > insert_before = &per_prio->fifo_list[data_dir]; > #ifdef CONFIG_BLK_DEV_ZONED > /* Making the mq-deadline request expiry time dependent on the task priority seems wrong to me. Thanks, Bart.