4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License version 2 for more details.
15 * You should have received a copy of the GNU General Public License
16 * version 2 along with this program; If not, see
17 * http://www.gnu.org/licenses/gpl-2.0.html
22 * Copyright (c) 2014, Intel Corporation.
24 * Copyright 2012 Xyratex Technology Limited
28 * Network Request Scheduler (NRS) Client Round Robin over NIDs (CRR-N) policy
32 #ifndef _LUSTRE_NRS_CRR_H
33 #define _LUSTRE_NRS_CRR_H
38 * CRR-N, Client Round Robin over NIDs
43 * private data structure for CRR-N NRS
46 struct ptlrpc_nrs_resource cn_res;
47 cfs_binheap_t *cn_binheap;
48 struct cfs_hash *cn_cli_hash;
50 * Used when a new scheduling round commences, in order to synchronize
51 * all clients with the new round number.
55 * Determines the relevant ordering amongst request batches within a
60 * Round Robin quantum; the maximum number of RPCs that each request
61 * batch for each client can have in a scheduling round.
67 * Object representing a client in CRR-N, as identified by its NID
69 struct nrs_crrn_client {
70 struct ptlrpc_nrs_resource cc_res;
71 struct hlist_node cc_hnode;
74 * The round number against which this client is currently scheduling
79 * The sequence number used for requests scheduled by this client during
80 * the current round number.
85 * Round Robin quantum; the maximum number of RPCs the client is allowed
86 * to schedule in a single batch of each round.
90 * # of pending requests for this client, on all existing rounds
96 * CRR-N NRS request definition
100 * Round number for this request; shared with all other requests in the
105 * Sequence number for this request; shared with all other requests in
112 * CRR-N policy operations.
116 * Read the RR quantum size of a CRR-N policy.
118 NRS_CTL_CRRN_RD_QUANTUM = PTLRPC_NRS_CTL_1ST_POL_SPEC,
120 * Write the RR quantum size of a CRR-N policy.
122 NRS_CTL_CRRN_WR_QUANTUM,