When assigning tx quotas for multiple connections, bump fractional amounts to the next higher integer. This can reduce the number of iterations through the tx scheduler. For example, if 5 avail acl buffers are to be used by 3 transmitting connections, the current scheduler will produce quotas of 1, 1, 1, 1, 1. This optimization will instead produce quotas of 2, 2, 1 (ie., 2 less iterations of the tx scheduler). Signed-off-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> --- net/bluetooth/hci_core.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 47a31fa..0defa83 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1826,7 +1826,7 @@ static inline struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type, int } if (conn) { - int cnt, q; + int cnt; switch (conn->type) { case ACL_LINK: @@ -1844,8 +1844,7 @@ static inline struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type, int BT_ERR("Unknown link type"); } - q = cnt / num; - *quote = q ? q : 1; + *quote = (cnt + (num - 1)) / num; } else *quote = 0; -- 1.7.4.1 ��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�